Esempio n. 1
0
        public override void Cancel(bool abortExecution)
        {
            lock (_lock)
            {
                _canceledWorkItemsGroup.IsCanceled = true;
                _workItemsQueue.Clear();
                _workItemsInStpQueue    = 0;
                _canceledWorkItemsGroup = new CanceledWorkItemsGroup();
            }

            if (abortExecution)
            {
                _stp.CancelAbortWorkItemsGroup(this);
            }
        }
	    public override void Cancel(bool abortExecution)
	    {
	        lock (_lock)
	        {
	            _canceledWorkItemsGroup.IsCanceled = true;
	            _workItemsQueue.Clear();
	            _workItemsInStpQueue = 0;
	            _canceledWorkItemsGroup = new CanceledWorkItemsGroup();
	        }

	        if (abortExecution)
	        {
	            _stp.CancelAbortWorkItemsGroup(this);
	        }
	    }