run<T> method

Future<T> run<T>(
  1. Task task
)

Implementation

Future<T> run<T>(Task task) async {
  var ts = _Task<T>(++id, task as Future<T> Function(), Completer<T>());
  _tasks.add(ts);
  _schedule();
  return ts.completer.future;
}