AsyncMutex class final
A non-reentrant asynchronous lock that runs critical sections one at a time, in the order protect was called.
Used to serialise read-modify-write cycles on shared state, such as the vault's account index, so that concurrent writers cannot lose updates. It only coordinates code within one isolate; it does not protect against other isolates or processes. Calling protect from inside a protected section deadlocks.
Constructors
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
protect<
T> (FutureOr< T> action()) → Future<T> -
Runs
actiononce every earlier critical section has finished and returns its result. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited