DotNext.Threading by Roman Sakno

<PackageReference Include="DotNext.Threading" Version="2.2.0" />

 AsyncEvent

public static class AsyncEvent
Represents various extension methods for types implementing IAsyncEvent interface.
public static Task<bool> WaitAsync(this IAsyncEvent event, TimeSpan timeout)

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

public static Task WaitAsync(this IAsyncEvent event, CancellationToken token)

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

public static Task WaitAsync(this IAsyncEvent event)

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