Actions
Class for running delegates asynchronously on the thread pool or on dedicated background threads.
Actions(Action Action)
Initializes a new instance of the Actions runner wrapping the specified delegate.
C#
var runner = new Actions(() => {
Console.WriteLine("Task running...");
});
Actions Run()
Executes the wrapped action asynchronously on the thread pool using Task.Run and updates RunningTask.
C#
var runner = new Actions(() => DoWork()).Run();
bool active = runner.IsRunning;
Actions RunOnDedicatedThread(bool DoInBackground = true)
Executes the action on a dedicated managed thread with an optional background thread flag.
C#
var runner = new Actions(() => DoLongWork()).RunOnDedicatedThread(true);