DotNext by Roman Sakno

<PackageReference Include="DotNext" Version="1.0.0" />

 EventHandlerFuture<T>

using System; using System.Threading; namespace DotNext.Runtime.CompilerServices { internal sealed class EventHandlerFuture<T> : AsyncDelegateFuture<EventHandler<T>> { private readonly object sender; private readonly T args; internal EventHandlerFuture(object sender, T args, CancellationToken token) : base(token) { this.sender = sender; this.args = args; } private protected override void InvokeOne(EventHandler<T> handler) { handler(sender, args); } } }