Show / Hide Table of Contents

Interface IAsyncEvent

Represents asynchronous event.

Inherited Members
ISynchronizer.HasWaiters
IDisposable.Dispose()
Namespace: DotNext.Threading
Assembly: DotNext.Threading.dll
Syntax
public interface IAsyncEvent : ISynchronizer, IDisposable

Properties

| Improve this Doc View Source

IsSet

Determines whether this event in signaled state.

Declaration
bool IsSet { get; }
Property Value
Type Description
Boolean

Methods

| Improve this Doc View Source

Reset()

Changes state of this even to non-signaled.

Declaration
bool Reset()
Returns
Type Description
Boolean

true, if state of this object changed from signaled to non-signaled state; otherwise, false.

Exceptions
Type Condition
ObjectDisposedException

The current instance has already been disposed.

| Improve this Doc View Source

Signal()

Raises asynchronous event if it meets internal conditions.

Declaration
bool Signal()
Returns
Type Description
Boolean

true, if state of this object changed from non-signaled to signaled state; otherwise, false.

Exceptions
Type Condition
ObjectDisposedException

The current instance has already been disposed.

| Improve this Doc View Source

WaitAsync(TimeSpan, CancellationToken)

Suspends the caller until this event is set.

Declaration
Task<bool> WaitAsync(TimeSpan timeout, CancellationToken token)
Parameters
Type Name Description
TimeSpan timeout

The number of time to wait before this event is set.

CancellationToken token

The token that can be used to cancel waiting operation.

Returns
Type Description
Task<Boolean>

true, if this event was set; otherwise, false.

Exceptions
Type Condition
ObjectDisposedException

The current instance has already been disposed.

ArgumentOutOfRangeException

timeout is negative.

OperationCanceledException

The operation has been canceled.

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