AutoResetEvent class

A AutoResetEvent is a synchronization primitive that is used to manage signaling.
When an event is in a signaled state, any calls to the wait method will not block execution of the calling code.
When an event is in a non-signaled state, any calls to the wait method will block execution of the calling code.

After unblocking one calling code, it automatically switches to the non-signaled state.

Constructors

AutoResetEvent(bool isSet)

Properties

hashCode int
The hash code for this object.
no setterinherited
isSet bool
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reset() Future<void>
Switches the event back to the non-signaled state.
All subsequent calls to the wait method will block the calling code.
inherited
set() Future<void>
Switches an event in the signaled state, allowing a single waiting code to continue executing.
If there is no waiting code, the event remains in signaled state until the wait method is called.
toString() String
A string representation of this object.
inherited
tryWait(Duration timeout) Future<bool>
wait() Future<void>
Blocks the calling code until the event switches the signaled state.
If the event is already in the signaled state, the calling code continues execution, and the event is immediately switched to the non-signaled state.

Operators

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