AsyncRwLock class
Async multi-reader / single-writer lock.
Writers hold an exclusive lock; readers hold a shared lock. New writers block until all existing readers have released; new readers queued behind a waiting writer also block, which keeps writers from starving.
Constructors
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
read<
T> (FutureOr< T> body()) → Future<T> -
Run
bodyunder a shared (read) lock. Multiple readers may run concurrently. The lock is released even ifbodythrows. -
toString(
) → String -
A string representation of this object.
inherited
-
write<
T> (FutureOr< T> body()) → Future<T> -
Run
bodyunder an exclusive (write) lock.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited