enqueueCancellable method
Enqueues task
for execution and return the completion future
Also provides the CancellationToken to the closure
Throws: TaskCancelledException
Implementation
@nonVirtual
Future<void> enqueueCancellable(CancellableTaskDelegate task) {
final completer = _Task<void>(task);
_queue.add(completer);
_dequeue();
return completer.future;
}