dispose method

void dispose()

Dispose of the queue

This will run the cancel function and close the remaining items stream To gracefully exit the queue, waiting for items to complete first, call await [Queue.onComplete]; before disposing

Implementation

void dispose() {
  _remainingItemsController?.close();
  cancel();
}