Completion Source Class
public ref class TaskCompletionSource
public class TaskCompletionSource
type TaskCompletionSource = class
Public Class TaskCompletionSource
It is often the case that a Task is desired to represent another asynchronous operation.
TaskCompletionSource is provided for this purpose. It enables the creation of a task that can be handed out to consumers, and those consumers can use the members of the task as they would any other. However, unlike most tasks, the state of a task created by a TaskCompletionSource is controlled explicitly by the methods on TaskCompletionSource. This enables the completion of the external asynchronous operation to be propagated to the underlying
Task. The separation also ensures that consumers are not able to transition the state without access to the corresponding TaskCompletionSource.
All members of TaskCompletionSource are thread-safe and may be used from multiple threads concurrently.
Creates a TaskCompletionSource.
Creates a TaskCompletionSource with the specified state.
Creates a TaskCompletionSource with the specified state and options.
Creates a TaskCompletionSource with the specified options.
Determines whether the specified object is equal to the current object.(Inherited from Object)
Serves as the default hash function.(Inherited from Object)
Gets the Type of the current instance.(Inherited from Object)
Creates a shallow copy of the current Object.(Inherited from Object)
Returns a string that represents the current object.(Inherited from Object)