Class AutoResetEvent
Notifies a waiting thread that an event has occurred. This class cannot be inherited.
public sealed class AutoResetEvent : WaitHandle
- Inheritance
-
AutoResetEvent
- Inherited Members
- Extension Methods
Constructors
AutoResetEvent(bool)
Initializes a new instance of the AutoResetEvent class with a Boolean value indicating whether to set the initial state to signaled.
public AutoResetEvent(bool initialState)
Parameters
initialState
booltrue to set the initial state to signaled; false to set the initial state to non-signaled.
Methods
Reset()
Sets the state of the event to nonsignaled, causing threads to block.
public bool Reset()
Returns
- bool
true if the operation succeeds; otherwise, false.
Set()
Sets the state of the event to signaled, allowing one or more waiting threads to proceed.
public bool Set()
Returns
- bool
true if the operation succeeds; otherwise, false.