5 writes to _headIndex
System.Collections.Concurrent (5)
System\Collections\Concurrent\ConcurrentBag.cs (5)
742_headIndex &= _mask; 799_headIndex = 0; 844_headIndex = _tailIndex = StartIndex; 988Interlocked.Exchange(ref _headIndex, unchecked(head + 1)); 1005_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) 861if (_headIndex - tail >= 0) 881if (!_frozen && (_headIndex - tail < 0)) 897if (_headIndex - tail <= 0) 936if (_headIndex - tail < 0) 949if (_headIndex - tail < 0) 968int head = _headIndex; // _headIndex is only manipulated under the lock 1029int headIndex = _headIndex; 1032count == (_tailIndex - _headIndex) || 1033count == (_tailIndex + 1 - _headIndex),