共用方式為


AsyncManualResetEvent Class

Definition

A flavor of ManualResetEvent that can be asynchronously awaited on.

public ref class AsyncManualResetEvent
[Windows::Foundation::Metadata::WebHostHidden]
class AsyncManualResetEvent
[System.Diagnostics.DebuggerDisplay("Signaled: {IsSet}")]
public class AsyncManualResetEvent
[<System.Diagnostics.DebuggerDisplay("Signaled: {IsSet}")>]
type AsyncManualResetEvent = class
Public Class AsyncManualResetEvent
Inheritance
AsyncManualResetEvent
Attributes

Constructors

AsyncManualResetEvent(Boolean, Boolean)

Initializes a new instance of the AsyncManualResetEvent class.

Properties

IsSet

Gets a value indicating whether the event is currently in a signaled state.

Methods

PulseAll()

Sets and immediately resets this event, allowing all current waiters to unblock.

Reset()

Resets this event to a state that will block callers of WaitAsync().

Set()

Sets this event to unblock callers of WaitAsync().

WaitAsync()

Returns a task that will be completed when this event is set.

WaitAsync(CancellationToken)

Returns a task that will be completed when this event is set.

Applies to

Thread Safety

This type is thread-safe for all members.