addJobThrow method Null safety

void addJobThrow(
  1. AsyncJob job
)

Add new job in to the queue

if the queue is closed, throw ClosedQueueException

Implementation

void addJobThrow(AsyncJob job) {
  if (isClosed) {
    throw ClosedQueueException("Closed Queue");
  } else {
    addJob(job);
  }
}