cancelAll method

void cancelAll()
inherited

Cancel all futures waiting for this lock to be available by throwing a LockAcquireFailureException to them.

Implementation

void cancelAll() {
  while (_waiters.isNotEmpty) {
    var waiter = _waiters.removeFirst();
    waiter.completeError(LockAcquireFailureException());
  }
}