Class WaitHandleExtensions
- Namespace
- MarymoorStudios.Core
- Assembly
- MarymoorStudios.Core.dll
Extensions to the standard WaitHandle.
public static class WaitHandleExtensions
- Inheritance
-
WaitHandleExtensions
- Inherited Members
Methods
WaitOneAsync(WaitHandle, CancellationToken)
Equivalent to a call to WaitOne() without blocking a thread.
public static Task WaitOneAsync(this WaitHandle handle, CancellationToken cancel = default)
Parameters
handle
WaitHandleThe handle to wait on.
cancel
CancellationTokenCancellation Token.
Returns
- Task
A task that resolves when the wait is complete.