WaitHandleExtensionsWaitOneAsync(WaitHandle, CancellationToken) Method
Waits for a signal asynchronously on the provided handle.
Namespace: KGySoft.ThreadingAssembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 10.0.0
public static Task<bool> WaitOneAsync(
this WaitHandle handle,
CancellationToken cancellationToken
)
<ExtensionAttribute>
Public Shared Function WaitOneAsync (
handle As WaitHandle,
cancellationToken As CancellationToken
) As Task(Of Boolean)
public:
[ExtensionAttribute]
static Task<bool>^ WaitOneAsync(
WaitHandle^ handle,
CancellationToken cancellationToken
)
[<ExtensionAttribute>]
static member WaitOneAsync :
handle : WaitHandle *
cancellationToken : CancellationToken -> Task<bool>
- handle WaitHandle
- The handle to wait on.
- cancellationToken CancellationToken
- A token for cancellation.
TaskBoolean, if the specified
handle receives a signal before canceling; otherwise,
.In Visual Basic and C#, you can call this method as an instance method on any object of type
WaitHandle. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).