Mutex class Null safety

A simple Mutex implementation using a Completer.

Constructors

Mutex()

Properties

hashCode int
The hash code for this object.
read-only, inherited
lastOperationCompletionAwaiter Future<void>
Allows listening to the completion status of the last worker process to be released.
read-only
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

lockAndRun<T>({required FutureOr<T> run(VoidCallback unlock)}) FutureOr<T>
Runs the given run function-block in a thread-safe/blocked zone. A convenient unlock() is provided, which can be called anywhere to signal re-entry.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited