DotNext.Threading by .NET Foundation and Contributors

<PackageReference Include="DotNext.Threading" Version="4.0.0-rc.2" />

 ManualResetCompletionSource

Represents base class for producer of value task.
public bool IsCompleted { get; }

Gets a value indicating that the source is in signaled state.

protected virtual void AfterConsumed()

Invokes when this source is ready to reuse.

public short Reset()

Attempts to reset state of this object for reuse.

public abstract bool TrySetCanceled(CancellationToken token)

Attempts to complete the task unsuccessfully.

public abstract bool TrySetException(Exception e)

Attempts to complete the task unsuccessfully.