-
-
Notifications
You must be signed in to change notification settings - Fork 357
TaskFactoryExtensions
StephenCleary edited this page Sep 5, 2014
·
1 revision
TaskFactoryExtensions
provides a series of Run
overloads for scheduling async
as well as synchronous delegates.
public static class TaskFactoryExtensions
{
// Queues work to the task factory and returns a task representing that work.
public static Task Run(this TaskFactory @this, Action action);
// Queues work to the task factory and returns a task representing that work.
public static Task<TResult> Run<TResult>(this TaskFactory @this, Func<TResult> action);
// Queues work to the task factory and returns a proxy task representing that work.
public static Task Run(this TaskFactory @this, Func<Task> action);
// Queues work to the task factory and returns a proxy task representing that work.
public static Task<TResult> Run<TResult>(this TaskFactory @this, Func<Task<TResult>> action);
// Queues work to the task factory and returns a task representing that work.
public static Task Run(this TaskFactory @this, Action action, CancellationToken cancellationToken);
// Queues work to the task factory and returns a task representing that work.
public static Task<TResult> Run<TResult>(this TaskFactory @this, Func<TResult> action, CancellationToken cancellationToken);
// Queues work to the task factory and returns a proxy task representing that work.
public static Task Run(this TaskFactory @this, Func<Task> action, CancellationToken cancellationToken);
// Queues work to the task factory and returns a proxy task representing that work.
public static Task<TResult> Run<TResult>(this TaskFactory @this, Func<Task<TResult>> action, CancellationToken cancellationToken);
}
The full API is supported on all platforms.