Class AsyncManualResetEvent
Represents asynchronous version of ManualResetEvent.
Inherited Members
Namespace: DotNext.Threading
Assembly: DotNext.Threading.dll
Syntax
public class AsyncManualResetEvent : Synchronizer, IAsyncResetEvent, IAsyncEvent, ISynchronizer, IDisposable
Constructors
| Improve this Doc View SourceAsyncManualResetEvent(Boolean)
Initializes a new asynchronous reset event in the specified state.
Declaration
public AsyncManualResetEvent(bool initialState)
Parameters
Type | Name | Description |
---|---|---|
Boolean | initialState | true to set the initial state signaled; false to set the initial state to non signaled. |
Methods
| Improve this Doc View SourceReset()
Sets the state of this event to non signaled, causing consumers to wait asynchronously.
Declaration
public bool Reset()
Returns
Type | Description |
---|---|
Boolean | true if the operation succeeds; otherwise, false. |
Exceptions
Type | Condition |
---|---|
ObjectDisposedException | The current instance has already been disposed. |
Set()
Sets the state of the event to signaled, allowing one or more awaiters to proceed.
Declaration
public bool Set()
Returns
Type | Description |
---|---|
Boolean | true if the operation succeeds; otherwise, false. |
Exceptions
Type | Condition |
---|---|
ObjectDisposedException | The current instance has already been disposed. |
Set(Boolean)
Sets the state of the event to signaled, allowing one or more awaiters to proceed; and, optionally, reverts the state of the event to initial state.
Declaration
public bool Set(bool autoReset)
Parameters
Type | Name | Description |
---|---|---|
Boolean | autoReset | true to reset this object to non-signaled state automatically; false to leave this object in signaled state. |
Returns
Type | Description |
---|---|
Boolean | true if the operation succeeds; otherwise, false. |
Exceptions
Type | Condition |
---|---|
ObjectDisposedException | The current instance has already been disposed. |
Explicit Interface Implementations
| Improve this Doc View SourceIAsyncEvent.Signal()
Declaration
bool IAsyncEvent.Signal()
Returns
Type | Description |
---|---|
Boolean |
IAsyncResetEvent.ResetMode
Declaration
EventResetMode IAsyncResetEvent.ResetMode { get; }
Returns
Type | Description |
---|---|
EventResetMode |