Represents the producer side of a Task<TResult> unbound to a delegate, providing access to the consumer side through the Task property. In many scenarios, it is useful to enable a Task<TResult> to represent an external asynchronous operation. TaskCompletionSource<TResult> is provided for this purpose. It enables the creation of a task that can be handed out to consumers. The consumers can use the members of the task the same way as they would in any other scenario handling task member variables. 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. For more information, see the entry The Nature of TaskCompletionSource<TResult> in the Parallel Programming with .NET blog.
[2017/6/30 15:40:36] - Enter program [2017/6/30 15:40:44] - You waited 8108ms [2017/6/30 15:40:44] - End program