A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://dotnet.github.io/dotNext/api/DotNext.Threading.AsyncManualResetEvent.html below:

Class AsyncManualResetEvent | .NEXT

Class AsyncManualResetEvent

Represents asynchronous version of ManualResetEvent.

Inheritance

AsyncManualResetEvent

Namespace: DotNext.Threading Assembly: DotNext.Threading.dll Syntax
public class AsyncManualResetEvent : QueuedSynchronizer, IAsyncResetEvent, IAsyncEvent, IDisposable, IResettable
Constructors | Edit this page View Source AsyncManualResetEvent(bool)

Initializes a new asynchronous reset event in the specified state.

Declaration
public AsyncManualResetEvent(bool initialState)
Parameters Type Name Description bool initialState

true to set the initial state signaled; false to set the initial state to non signaled.

| Edit this page View Source AsyncManualResetEvent(bool, int)

Initializes a new asynchronous reset event in the specified state.

Declaration
public AsyncManualResetEvent(bool initialState, int concurrencyLevel)
Parameters Type Name Description bool initialState

true to set the initial state signaled; false to set the initial state to non signaled.

int concurrencyLevel

The potential number of suspended callers.

Exceptions Properties | Edit this page View Source IsSet

Indicates whether this event is set.

Declaration
public bool IsSet { get; }
Property Value Methods | Edit this page View Source Reset()

Sets the state of this event to non signaled, causing consumers to wait asynchronously.

Declaration Returns Type Description bool

true if the operation succeeds; otherwise, false.

Exceptions | Edit this page View Source Set()

Sets the state of the event to signaled, allowing one or more awaiters to proceed.

Declaration Returns Type Description bool

true if the operation succeeds; otherwise, false.

Exceptions | Edit this page View Source Set(bool)

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 bool autoReset

true to reset this object to non-signaled state automatically; false to leave this object in signaled state.

Returns Type Description bool

true if the operation succeeds; otherwise, false.

Exceptions | Edit this page View Source WaitAsync(CancellationToken)

Turns caller into idle state until the current event is set.

Declaration
public ValueTask WaitAsync(CancellationToken token = default)
Parameters Type Name Description CancellationToken token

The token that can be used to abort wait process.

Returns Type Description ValueTask

The task representing asynchronous result.

Exceptions | Edit this page View Source WaitAsync(TimeSpan, CancellationToken)

Turns caller into idle state until the current event is set.

Declaration
public ValueTask<bool> WaitAsync(TimeSpan timeout, CancellationToken token = default)
Parameters Type Name Description TimeSpan timeout

The interval to wait for the signaled state.

CancellationToken token

The token that can be used to abort wait process.

Returns Exceptions Implements Extension Methods

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4