Creates a TaskCompletionSource that orchestrates a Task. This allows the creator of a task to be solely responsible for its completion. @return A new TaskCompletionSource.
()
| 101 | * @return A new TaskCompletionSource. |
| 102 | */ |
| 103 | public static <TResult> Task<TResult>.TaskCompletionSource create() { |
| 104 | Task<TResult> task = new Task<TResult>(); |
| 105 | return task.new TaskCompletionSource(); |
| 106 | } |
| 107 | |
| 108 | /** |
| 109 | * @return {@code true} if the task completed (has a result, an error, or was cancelled. |
no outgoing calls