submitOrRun<T> method

Future<T> submitOrRun<T>(
  1. Future<T> task()
)

Implementation

Future<T> submitOrRun<T>(Future<T> Function() task) async {
  if (_disposers.isDisposed) {
    return await task();
  } else {
    return await submit(task);
  }
}