wait<T> method
The former name of abandonable, kept for one release.
Does what abandonable does; only the StateError of a call made
after the job has finished names wait.
Implementation
@Deprecated('Use abandonable')
@override
Future<T> wait<T>(
FutureOr<T> Function() action, {
FutureOr<void> Function(T value)? dispose,
FutureOr<void> Function(T value)? discard,
}) async {
throwIfFinished('wait');
return abandonable(action, dispose: dispose, discard: discard);
}