Пример #1
0
 public void AbortTask()
 {
     gAbortTask = true;
     if (gCurrentTask != null)
     {
         gCurrentTask.AbortTask();
     }
 }
Пример #2
0
    private void AbortTasks()
    {
        foreach (var task in _taskQueue)
        {
            task.AbortTask();
        }

        if (_currentTask != null)
        {
            _currentTask.ResultHandler -= OnTaskFinish;
            _currentTask.AbortTask();
            _currentTask = null;
        }

        _taskQueue.Clear();
    }
Пример #3
0
    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);
    }