Esempio n. 1
0
 private void ReturnSegmentUnsynchronized(BufferSegment segment)
 {
     if (_bufferSegmentPool.Count < MaxSegmentPoolSize)
     {
         _bufferSegmentPool.Push(segment);
     }
 }
Esempio n. 2
0
        private void ReturnSegmentUnsynchronized(BufferSegment segment)
        {
            Debug.Assert(segment != _readHead, "Returning _readHead segment that's in use!");
            Debug.Assert(segment != _readTail, "Returning _readTail segment that's in use!");
            Debug.Assert(segment != _writingHead, "Returning _writingHead segment that's in use!");

            if (_bufferSegmentPool.Count < MaxSegmentPoolSize)
            {
                _bufferSegmentPool.Push(segment);
            }
        }