Task::Run Method
Queues the specified work to run on the ThreadPool and returns a task or Task<TResult> handle for that work.
Assembly: mscorlib (in mscorlib.dll)
| Name | Description | |
|---|---|---|
![]() ![]() | Run(Action^) | Queues the specified work to run on the thread pool and returns a Task object that represents that work. |
![]() ![]() | Run(Action^, CancellationToken) | Queues the specified work to run on the thread pool and returns a Task object that represents that work. A cancellation token allows the work to be cancelled. |
![]() ![]() | Run(Func<Task^>^) | Queues the specified work to run on the thread pool and returns a proxy for the task returned by function. |
![]() ![]() | Run(Func<Task^>^, CancellationToken) | Queues the specified work to run on the thread pool and returns a proxy for the task returned by function. |
![]() ![]() | Run<TResult>(Func<TResult>^) | Queues the specified work to run on the thread pool and returns a Task<TResult> object that represents that work. |
![]() ![]() | Run<TResult>(Func<TResult>^, CancellationToken) | Queues the specified work to run on the thread pool and returns a Task(TResult) object that represents that work. A cancellation token allows the work to be cancelled. |
![]() ![]() | Run<TResult>(Func<Task<TResult>^>^) | Queues the specified work to run on the thread pool and returns a proxy for the Task(TResult) returned by function. |
![]() ![]() | Run<TResult>(Func<Task<TResult>^>^, CancellationToken) | Queues the specified work to run on the thread pool and returns a proxy for the Task(TResult) returned by function. |
The Run method provides a set of overloads that make it easy to start a task by using default values. It is a lightweight alternative to the StartNew overloads.

