public void AbortTask() { gAbortTask = true; if (gCurrentTask != null) { gCurrentTask.AbortTask(); } }
private void AbortTasks() { foreach (var task in _taskQueue) { task.AbortTask(); } if (_currentTask != null) { _currentTask.ResultHandler -= OnTaskFinish; _currentTask.AbortTask(); _currentTask = null; } _taskQueue.Clear(); }
public void DeleteJob() { if (_wasJobCanceled) { return; } _wasJobCanceled = true; if (_worker != null) { _worker.WithdrawJob(); _task.ResultHandler -= OnJobFinish; _task.AbortTask(); } DeleteJobIcon(); JobSystem.GetInstance().DeleteJob(this); OnJobResultChanged(false); }