submit<Q, R> method

  1. @override
Future<R> submit<Q, R>(
  1. Job<Q, R> job
)
override

Implementation

@override
Future<R> submit<Q, R>(Job<Q, R> job) async {
  if (_disposed) {
    throw CancellationException();
  }
  final internalJob = _Job(job);
  _queue.add(internalJob); //LIFO
  _schedule();
  return internalJob.completer.future;
}