release method

void release()

Implementation

void release() {
  if (_waitQueue.isNotEmpty) {
    Completer<void> completer = _waitQueue.removeFirst();
    completer.complete();
  } else {
    _permits++;
  }
}