There\'s something unclear to me about the inner workings of TaskCompletionSource<>
.
When creating a simple Task<>
using the
The answer is that a TaskCreationOption is useful for its AttachToParent option only, as TaskCompletionSource can be the child of any other task. Options related to thread management or execution ordering aren't relevant in the context of a TaskCompletionSource. The following code actually throws an exception:
new TaskCompletionSource<WebResponse>(TaskCreationOptions.LongRunning);