Class MtaTaskScheduler
Simple task scheduler that runs tasks on pulled threads with MTA apartment state. Automatically cleans up resources when the application exits
Inheritance
object
MtaTaskScheduler
Namespace: CAMAPI.DotnetHelper
Assembly: CAMAPI.DotnetHelper.dll
Syntax
public static class MtaTaskScheduler : Object
Methods
Run(Action)
Execute action on a pulled thread
Declaration
public static Task Run(Action action)
Parameters
Type | Name | Description |
---|---|---|
System.Action | action |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Run<T>(Func<T>)
Delegate that returns a value
Declaration
public static Task<T> Run<T>(Func<T> func)
Parameters
Type | Name | Description |
---|---|---|
System.Func<><T> | func |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<><T> |
Type Parameters
Name | Description |
---|---|
T |