cancel method
Cancels the queue.
Any unprocessed items will be completed with a QueueCancelledException. Subsequent calls to add will also throw a QueueCancelledException.
Implementation
@override
void cancel() {
for (final item in _nextCycle) {
item.completer.completeError(QueueCancelledException());
}
_nextCycle.clear();
_isCancelled = true;
}