<PackageReference Include="Nito.AsyncEx.Tasks" Version="5.0.0-pre-03" />

Nito.AsyncEx.TaskFactoryExtensions

public static class TaskFactoryExtensions
Provides extension methods for task factories.
public static Task Run(this TaskFactory this, Action action)

Queues work to the task factory and returns a Task representing that work. If the task factory does not specify a task scheduler, the thread pool task scheduler is used.

public static Task<TResult> Run<TResult>(this TaskFactory this, Func<TResult> action)

Queues work to the task factory and returns a Task<T> representing that work. If the task factory does not specify a task scheduler, the thread pool task scheduler is used.

public static Task Run(this TaskFactory this, Func<Task> action)

Queues work to the task factory and returns a proxy Task representing that work. If the task factory does not specify a task scheduler, the thread pool task scheduler is used.

public static Task<TResult> Run<TResult>(this TaskFactory this, Func<Task<TResult>> action)

Queues work to the task factory and returns a proxy Task<T> representing that work. If the task factory does not specify a task scheduler, the thread pool task scheduler is used.