示例#1
0
 /// <summary>
 /// Remove a task from the continuously running by its id.
 /// </summary>
 /// <param name="task"></param>
 /// <param name="id">Task id that runs in background.</param>
 public static void StopRunningInBackground(this Action task, string id = "")
 => GhostThread.RemoveTask(id);
示例#2
0
 public static void RunInBackground(this Func <Task> task, string id = "", int runningTime = 120)
 => GhostThread.AddTask(task, id, runningTime);