Пример #1
0
        public void Abort()
        {
            // Make sure to set the aborted flag before running any continuations.
            _flow.Abort();

            while (_awaitableProvider.ActiveCount > 0)
            {
                _awaitableProvider.CompleteCurrent();
            }
        }
Пример #2
0
        public void Abort()
        {
            // Make sure to set the aborted flag before running any continuations.
            _flow.Abort();

            while (_awaitableQueue?.Count > 0)
            {
                _awaitableQueue.Dequeue().Complete();
            }
        }
Пример #3
0
        public int Abort()
        {
            lock (_flowLock)
            {
                if (_flow.IsAborted)
                {
                    return(0);
                }

                _flow.Abort();

                // Tell caller to return connection window space consumed by this stream. Even if window updates have
                // been disabled at the stream level, connection-level window updates may still be necessary.
                return(_initialWindowSize - _flow.Available);
            }
        }