async_locks library

Synchronization primitives for asynchronous Dart code.

See also:

Classes

Event
Event object to notify multiple futures that an event has happened.
Lock
Mutex lock to guarantee exclusive access to a shared state.
Semaphore
Semaphore object which allows a number of futures to acquire it.
UnfairLock
An UnfairLock object is identical to a Lock excepts that it wakes up the last future that called acquire instead of the first
UnfairSemaphore
A UnfairSemaphore object is identical to a Semaphore excepts that it wakes up the last future that called acquire instead of the first

Exceptions / Errors

AsyncLocksException
Base class for all exceptions from this package
EventCancelledException
Exception thrown to futures cancelled by Event.cancelAll
LockAcquireFailureException
Exception thrown to futures cancelled by Lock.cancelAll or UnfairLock.cancelAll
SemaphoreAcquireFailureException
Exception thrown to futures cancelled by Semaphore.cancelAll or UnfairSemaphore.cancelAll