Ejemplo n.º 1
0
        private void CancelDirect()
        {
            _state = State.Canceled;
            var cancelContainer = Internal.CancelContainerVoid.GetOrCreate();

            _valueOrPrevious = cancelContainer;
            AddBranchesToHandleQueueBack(cancelContainer);
            CancelProgressListeners();
            Internal.AddToHandleQueueFront(this);
        }
Ejemplo n.º 2
0
        protected void CancelDirect <TCancel>(ref TCancel reason)
        {
            _state = State.Canceled;
            var cancelContainer = Internal.CreateCancelContainer(ref reason);

            cancelContainer.Retain();
            _valueOrPrevious = cancelContainer;
            AddBranchesToHandleQueueBack(cancelContainer);
            CancelProgressListeners();
            Internal.AddToHandleQueueFront(this);
        }