TYPE

TaskCompletionSource<T>

Exposes a task whose completion can be supplied by an external producer.

Formal Syntax & Structure

csharp syntaxcsharp
new TaskCompletionSource<T>(TaskCreationOptions)

Working Example

Example Snippetcsharp
// Documentary fragment; see lesson for context and imports.var gate = new TaskCompletionSource<int>(TaskCreationOptions.RunContinuationsAsynchronously);
C# & .NET Reference