clear method

void clear()

Clears this RateLimiter.

Implementation

void clear() {
  ++_iteration;

  _timer?.cancel();
  _timer = null;

  for (var m in queue) {
    if (m.isLocked) {
      m.release();
    }
  }

  queue.clear();
}