Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d0e2281

Browse files
authored
Remove volatile on field in ConcurrentDictionary.Tables (#36976)
1 parent bd6cbe3 commit d0e2281

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libraries/System.Collections.Concurrent/src/System/Collections/Concurrent/ConcurrentDictionary.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ private sealed class Tables
4444
{
4545
internal readonly Node[] _buckets; // A singly-linked list for each bucket.
4646
internal readonly object[] _locks; // A set of locks, each guarding a section of the table.
47-
internal volatile int[] _countPerLock; // The number of elements guarded by each lock.
47+
internal readonly int[] _countPerLock; // The number of elements guarded by each lock.
4848

4949
internal Tables(Node[] buckets, object[] locks, int[] countPerLock)
5050
{

0 commit comments

Comments
 (0)