Ejemplo n.º 1
0
 /// <summary>
 /// Add a task to task queue
 /// </summary>
 /// <param name="task">The task to add.</param>
 /// <param name="priority">The priority of the task, higher priority will be process as soon as posible.</param>
 public void AddTask(MTTask task, int priority = 0)
 {
     Tasks.EnQueue(priority, task);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Callback when error thrown.
 /// </summary>
 /// <param name="task">The task where the exception thrown.</param>
 /// <param name="ex">The exception.</param>
 internal virtual void InternalErrorCallback(MTTask task, Exception ex)
 {
     OnTaskError?.Invoke(task, ex);
 }