5 writes to _headIndex
System.Collections.Concurrent (5)
System\Collections\Concurrent\ConcurrentBag.cs (5)
742_headIndex &= _mask; 799_headIndex = 0; 844_headIndex = _tailIndex = StartIndex; 985Interlocked.Exchange(ref _headIndex, unchecked(head + 1)); 1002_headIndex = head;
15 references to _headIndex
System.Collections.Concurrent (15)
System\Collections\Concurrent\ConcurrentBag.cs (15)
674/// <summary>Mask and'd with <see cref="_headIndex"/> and <see cref="_tailIndex"/> to get an index into <see cref="_array"/>.</summary> 707return _headIndex - _tailIndex >= 0; 744Debug.Assert(_headIndex - _tailIndex <= 0); 766int head = _headIndex; // read after _currentOp set to Add 778head = _headIndex; 842if (_headIndex - _tailIndex < 0) 858if (_headIndex - tail >= 0) 878if (!_frozen && (_headIndex - tail < 0)) 894if (_headIndex - tail <= 0) 933if (_headIndex - tail < 0) 946if (_headIndex - tail < 0) 965int head = _headIndex; // _headIndex is only manipulated under the lock 1026int headIndex = _headIndex; 1029count == (_tailIndex - _headIndex) || 1030count == (_tailIndex + 1 - _headIndex),