Show / Hide Table of Contents

Class AsyncManualResetEvent

Represents asynchronous version of ManualResetEvent.

Inheritance
Object
Synchronizer
AsyncManualResetEvent
Implements
IAsyncResetEvent
IAsyncEvent
ISynchronizer
IDisposable
Inherited Members
Synchronizer.ISynchronizer.HasWaiters
Synchronizer.IsSet
Synchronizer.WaitAsync(TimeSpan, CancellationToken)
Synchronizer.WaitAsync<T>(Predicate<T>, T, TimeSpan, CancellationToken)
Synchronizer.WaitAsync<T>(Predicate<T>, T, CancellationToken)
Synchronizer.WaitAsync<T1, T2>(Func<T1, T2, Boolean>, T1, T2, TimeSpan, CancellationToken)
Synchronizer.WaitAsync<T1, T2>(Func<T1, T2, Boolean>, T1, T2, CancellationToken)
Synchronizer.Dispose(Boolean)
Namespace: DotNext.Threading
Assembly: DotNext.Threading.dll
Syntax
public class AsyncManualResetEvent : Synchronizer, IAsyncResetEvent, IAsyncEvent, ISynchronizer, IDisposable

Constructors

| Improve this Doc View Source

AsyncManualResetEvent(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 Source

Reset()

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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 Source

IAsyncEvent.Signal()

Declaration
bool IAsyncEvent.Signal()
Returns
Type Description
Boolean
| Improve this Doc View Source

IAsyncResetEvent.ResetMode

Declaration
EventResetMode IAsyncResetEvent.ResetMode { get; }
Returns
Type Description
EventResetMode

Implements

IAsyncResetEvent
IAsyncEvent
ISynchronizer
System.IDisposable

Extension Methods

AsyncLockAcquisition.AcquireLockAsync<T>(T, TimeSpan)
AsyncLockAcquisition.AcquireLockAsync<T>(T, CancellationToken)
AsyncLockAcquisition.AcquireReadLockAsync<T>(T, TimeSpan)
AsyncLockAcquisition.AcquireReadLockAsync<T>(T, CancellationToken)
AsyncLockAcquisition.AcquireWriteLockAsync<T>(T, TimeSpan)
AsyncLockAcquisition.AcquireWriteLockAsync<T>(T, CancellationToken)
AsyncLockAcquisition.AcquireUpgradeableReadLockAsync<T>(T, TimeSpan)
AsyncLockAcquisition.AcquireUpgradeableReadLockAsync<T>(T, CancellationToken)
AsyncEvent.WaitAsync(IAsyncEvent, TimeSpan)
AsyncEvent.WaitAsync(IAsyncEvent, CancellationToken)
AsyncEvent.WaitAsync(IAsyncEvent)
ObjectExtensions.GetUserData<T>(T)
ObjectExtensions.IsOneOf<T>(T, IEnumerable<T>)
ObjectExtensions.IsOneOf<T>(T, T[])
ObjectExtensions.Decompose<T, TResult1, TResult2>(T, Func<T, TResult1>, Func<T, TResult2>, out TResult1, out TResult2)
ObjectExtensions.Decompose<T, TResult1, TResult2>(T, ValueFunc<T, TResult1>, ValueFunc<T, TResult2>, out TResult1, out TResult2)
ObjectExtensions.Decompose<T, TResult1, TResult2>(T, Func<T, TResult1>, Func<T, TResult2>)
ObjectExtensions.Decompose<T, TResult1, TResult2>(T, ValueFunc<T, TResult1>, ValueFunc<T, TResult2>)
ObjectExtensions.As<T>(T)
LockAcquisition.AcquireReadLock<T>(T)
LockAcquisition.AcquireReadLock<T>(T, TimeSpan)
LockAcquisition.AcquireWriteLock<T>(T)
LockAcquisition.AcquireWriteLock<T>(T, TimeSpan)
LockAcquisition.AcquireUpgradeableReadLock<T>(T)
LockAcquisition.AcquireUpgradeableReadLock<T>(T, TimeSpan)
ExpressionBuilder.Const<T>(T)
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX