notifyAll method
Removes all elements from the wait queue and waits for the lock to be
acquired for each element separately.
After the locks acquired, schedules the actions specified in the removed
from the queue elements to run.
Implementation
Future<void> notifyAll() {
while (_queue.isNotEmpty) {
final awaiter = _queue.removeFirst();
lock.acquire().then((_) {
awaiter.complete(true);
});
}
return _void;
}