Class TaskExtensions
- Namespace
- WindowSill.API
- Assembly
- WindowSill.API.dll
Provides a set of helper method to play around with threads.
public static class TaskExtensions
- Inheritance
-
TaskExtensions
- Inherited Members
Methods
CompleteOnCurrentThread(Task)
Gets the result of the task synchronously, on the current thread.
public static void CompleteOnCurrentThread(this Task task)
Parameters
taskTask
CompleteOnCurrentThread<T>(Task<T>)
Gets the result of the task synchronously, on the current thread.
public static T CompleteOnCurrentThread<T>(this Task<T> task)
Parameters
taskTask<T>
Returns
- T
Type Parameters
T
Forget(Task)
Runs a task without waiting for its result.
public static void Forget(this Task _)
Parameters
_Task
ForgetSafely(Task, Action<Exception>?)
Runs a task without waiting for its result. Swallows or handle any exception caused by the task.
public static void ForgetSafely(this Task task, Action<Exception>? errorHandler = null)
Parameters
Forget<T>(Task<T>)
Runs a task without waiting for its result.
public static void Forget<T>(this Task<T> _)
Parameters
_Task<T>
Type Parameters
T