release method

void release()

Releases the current lock on the semaphore.

This is only necessary for special use cases in conjunction with lock. Most of the time runLocked, debounce or throttle should be preferred.

Implementation

void release() {
  final temp = completer;
  completer = null;
  temp?.complete();
}