close method Null safety

void close(
  1. {bool forceStop = false}
)

close the queue so that no more job can be added

forceStop if true, all remain jobs will be canceled;

Implementation

void close({bool forceStop = false}) {
  _isClosed = true;
  _isForcedClosed = forceStop;

  return _emitEvent(QueueEventType.queueClosed);
}