5 writes to _headIndex
System.Collections.Concurrent (5)
System\Collections\Concurrent\ConcurrentBag.cs (5)
748_headIndex &= _mask; 805_headIndex = 0; 850_headIndex = _tailIndex = StartIndex; 991Interlocked.Exchange(ref _headIndex, unchecked(head + 1)); 1008_headIndex = head;
15 references to _headIndex
System.Collections.Concurrent (15)
System\Collections\Concurrent\ConcurrentBag.cs (15)
680/// <summary>Mask and'd with <see cref="_headIndex"/> and <see cref="_tailIndex"/> to get an index into <see cref="_array"/>.</summary> 713return _headIndex - _tailIndex >= 0; 750Debug.Assert(_headIndex - _tailIndex <= 0); 772int head = _headIndex; // read after _currentOp set to Add 784head = _headIndex; 848if (_headIndex - _tailIndex < 0) 864if (_headIndex - tail >= 0) 884if (!_frozen && (_headIndex - tail < 0)) 900if (_headIndex - tail <= 0) 939if (_headIndex - tail < 0) 952if (_headIndex - tail < 0) 971int head = _headIndex; // _headIndex is only manipulated under the lock 1032int headIndex = _headIndex; 1035count == (_tailIndex - _headIndex) || 1036count == (_tailIndex + 1 - _headIndex),