DotNext.Threading by Roman Sakno

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

 Future<TResult>

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

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<TResult> AsTask()

Converts this future to the task.

protected void Complete(Result<TResult> e)

Completes future unsuccessfully.

protected TResult GetResult()

Gets value associated with this future.

public void OnCompleted(Action callback)

Attaches the callback that will be invoked on completion.