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
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-signaledstate.
All subsequent calls to the wait method will block the calling code.inherited -
set(
) → Future< void> -
Switches an event in the
signaledstate, allowing a single waiting code to continue executing.
If there is no waiting code, the event remains insignaledstate 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
signaledstate.
If the event is already in thesignaledstate, the calling code continues execution, and the event is immediately switched to thenon-signaledstate.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited