Task.Run Method
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Queues the specified work to run on the ThreadPool and returns a Task or Task(TResult) handle for that work.
This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.
| Name | Description | |
|---|---|---|
|
Run(Action) | Queues the specified work to run on the ThreadPool and returns a Task handle for that work. |
|
Run<TResult>(Func<Task<TResult>>) | Queues the specified work to run on the ThreadPool and returns a proxy for the Task(TResult) returned by function. |
|
Run(Func<Task>) | Queues the specified work to run on the ThreadPool and returns a proxy for the Task returned by function. |
|
Run<TResult>(Func<TResult>) | Queues the specified work to run on the ThreadPool and returns a Task(TResult) handle for that work. |
|
Run(Action, CancellationToken) | Queues the specified work to run on the ThreadPool and returns a Task handle for that work. |
|
Run<TResult>(Func<Task<TResult>>, CancellationToken) | Queues the specified work to run on the ThreadPool and returns a proxy for the Task(TResult) returned by function. |
|
Run(Func<Task>, CancellationToken) | Queues the specified work to run on the ThreadPool and returns a proxy for the Task returned by function. |
|
Run<TResult>(Func<TResult>, CancellationToken) | Queues the specified work to run on the ThreadPool and returns a Task(TResult) handle for that work. |
Show: