3 writes to _tables
System.Collections.Concurrent (3)
System\Collections\Concurrent\ConcurrentDictionary.cs (3)
226
_tables
= new Tables(buckets, locks, countPerLock, comparer);
726
_tables
= newTables;
2070
_tables
= newTables;
54 references to _tables
System.Collections.Concurrent (54)
System\Collections\Concurrent\ConcurrentDictionary.cs (54)
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)
908
_buckets = _dictionary.
_tables
._buckets;
970
if (tables !=
_tables
)
972
tables =
_tables
;
1107
TryAddInternal(
_tables
, key, null, value, updateIfExists: true, acquireLock: true, out _);
1136
IEqualityComparer<TKey>? comparer =
_tables
._comparer;
1184
foreach (int value in
_tables
._countPerLock)
1219
Tables tables =
_tables
;
1261
Tables tables =
_tables
;
1293
Tables tables =
_tables
;
1345
Tables tables =
_tables
;
1370
if (tables !=
_tables
)
1372
tables =
_tables
;
1418
Tables tables =
_tables
;
1443
if (tables !=
_tables
)
1445
tables =
_tables
;
1484
Tables tables =
_tables
;
1509
if (tables !=
_tables
)
1511
tables =
_tables
;
1958
!
_tables
._countPerLock.AsSpan().ContainsAnyExcept(0);
1975
if (tables !=
_tables
)
2090
CDSCollectionETWBCLProvider.Log.ConcurrentDictionary_AcquiringAllLocks(
_tables
._buckets.Length);
2095
AcquirePostFirstLock(
_tables
, ref locksAcquired);
2096
Debug.Assert(locksAcquired ==
_tables
._locks.Length);
2108
object[] locks =
_tables
._locks;
2144
object[] locks =
_tables
._locks;
2169
foreach (VolatileNode bucket in
_tables
._buckets)
2205
foreach (VolatileNode bucket in
_tables
._buckets)
2368
Debug.Assert(IsCompatibleKey<TAlternateKey>(dictionary.
_tables
));
2416
Tables tables = Dictionary.
_tables
;
2435
if (tables != Dictionary.
_tables
)
2437
tables = Dictionary.
_tables
;
2575
Tables tables = Dictionary.
_tables
;
2621
Tables tables = Dictionary.
_tables
;
2638
if (tables != Dictionary.
_tables
)
2640
tables = Dictionary.
_tables
;