reset static method

void reset()

Cancels every queued waiter and resets the active count to zero.

Implementation

static void reset() {
  for (final c in _waiting) {
    if (!c.isCompleted) c.completeError(StateError('cancelled'));
  }
  _waiting.clear();
  _active = 0;
}