3 writes to _tables
System.Private.CoreLib (3)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\Concurrent\ConcurrentDictionary.cs (3)
226
_tables
= new Tables(buckets, locks, countPerLock, comparer);
726
_tables
= newTables;
2045
_tables
= newTables;
53 references to _tables
System.Private.CoreLib (53)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\Concurrent\ConcurrentDictionary.cs (53)
26
/// When using <see cref="
_tables
"/>, we must read the volatile _tables field into a local variable:
245
if (!IsCompatibleKey<TAlternateKey>(
_tables
))
266
if (IsCompatibleKey<TAlternateKey>(
_tables
))
295
/// The comparer. It's passed in to avoid having to look it up via a volatile read on <see cref="
_tables
"/>;
314
/// The comparer. It's passed in to avoid having to look it up via a volatile read on <see cref="
_tables
"/>;
343
if (!TryAddInternal(
_tables
, pair.Key, null, pair.Value, updateIfExists: false, acquireLock: false, out _))
351
Tables tables =
_tables
;
374
return TryAddInternal(
_tables
, key, null, value, updateIfExists: false, acquireLock: true, out _);
442
Tables tables =
_tables
;
456
if (tables !=
_tables
)
458
tables =
_tables
;
524
Tables tables =
_tables
;
613
return TryUpdateInternal(
_tables
, key, null, newValue, comparisonValue);
651
if (tables !=
_tables
)
653
tables =
_tables
;
724
Tables tables =
_tables
;
809
foreach (VolatileNode bucket in
_tables
._buckets)
824
foreach (VolatileNode bucket in
_tables
._buckets)
839
foreach (VolatileNode bucket in
_tables
._buckets)
901
ConcurrentDictionary<TKey, TValue>.VolatileNode[]? buckets = _buckets ??= _dictionary.
_tables
._buckets;
945
if (tables !=
_tables
)
947
tables =
_tables
;
1082
TryAddInternal(
_tables
, key, null, value, updateIfExists: true, acquireLock: true, out _);
1111
IEqualityComparer<TKey>? comparer =
_tables
._comparer;
1159
foreach (int value in
_tables
._countPerLock)
1194
Tables tables =
_tables
;
1236
Tables tables =
_tables
;
1268
Tables tables =
_tables
;
1320
Tables tables =
_tables
;
1345
if (tables !=
_tables
)
1347
tables =
_tables
;
1393
Tables tables =
_tables
;
1418
if (tables !=
_tables
)
1420
tables =
_tables
;
1459
Tables tables =
_tables
;
1484
if (tables !=
_tables
)
1486
tables =
_tables
;
1933
!
_tables
._countPerLock.AsSpan().ContainsAnyExcept(0);
1950
if (tables !=
_tables
)
2065
AcquirePostFirstLock(
_tables
, ref locksAcquired);
2066
Debug.Assert(locksAcquired ==
_tables
._locks.Length);
2078
object[] locks =
_tables
._locks;
2114
object[] locks =
_tables
._locks;
2139
foreach (VolatileNode bucket in
_tables
._buckets)
2175
foreach (VolatileNode bucket in
_tables
._buckets)
2338
Debug.Assert(IsCompatibleKey<TAlternateKey>(dictionary.
_tables
));
2386
Tables tables = Dictionary.
_tables
;
2405
if (tables != Dictionary.
_tables
)
2407
tables = Dictionary.
_tables
;
2545
Tables tables = Dictionary.
_tables
;
2591
Tables tables = Dictionary.
_tables
;
2608
if (tables != Dictionary.
_tables
)
2610
tables = Dictionary.
_tables
;