addNode method Null safety
- AsyncNode node
Implementation
@override
void addNode(AsyncNode node) {
if (isClosed) {
return _emitEvent(QueueEventType.violateAddWhenClosed);
}
_enqueue(node);
if (_map.containsKey(node.label)) {
throw DuplicatedLabelException("A job with this label already exists");
}
_map[node.label] = node;
_enqueue(node);
if (_autoRun) start();
}