Exemple #1
0
 /// <summary>
 ///     Add a Task to the queue
 /// </summary>
 /// <param name="task">Task to add</param>
 /// <returns></returns>
 public Task <T> Enqueue <T>(Task <T> task, string taskName = "")
 {
     if (!string.IsNullOrEmpty(taskName))
     {
         task.Tag(taskName);
     }
     ScheduledTasks.Enqueue(task);
     TaskManagerWorkerLoop();
     return(task);
 }