Yet another one threading tools library for .NET.
You can use async await for WaitHandler
. For example:
using var handler = new ManualResetEvent(initialState: false);
...
await handler.WaitAsync(cancellationToken: cts.Token);
AwaitAsync()
is awaiable for ManualResetEvent
, AutoResetEvent
etc.