DotNext.Threading by Roman Sakno

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

 Future

public abstract class Future : IFuture, INotifyCompletion, IValueTaskSource
Represents lightweight version of Task.
public interface IAwaiter

Represents awaiter of the asynchronous computation result represented by future object.

public bool IsCompleted { get; }

Determines whether asynchronous operation referenced by this object is already completed.

protected Future(bool runContinuationsAsynchronously = true, bool continueOnCapturedContext = false)

Initializes a new future.

public ValueTask AsTask()

Converts this future to the task.

protected void Complete(Exception e = null)

Completes this future.

protected void GetResult()

Gets value associated with this future.

public void OnCompleted(Action callback)

Attaches the callback that will be invoked on completion.