2 instantiations of ThreadCounts
System.Private.CoreLib (2)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\PortableThreadPool.ThreadCounts.cs (2)
162
public ThreadCounts VolatileRead() => new
ThreadCounts
(Volatile.Read(ref _data));
173
return new
ThreadCounts
(Interlocked.CompareExchange(ref _data, newCounts._data, oldCounts._data));
32 references to ThreadCounts
System.Private.CoreLib (32)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\PortableThreadPool.Blocking.cs (1)
129
ThreadCounts
counts = _separated.counts;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\PortableThreadPool.cs (4)
88
public
ThreadCounts
counts; // SOS's ThreadPool command depends on this name
326
ThreadCounts
counts = _separated.counts.VolatileRead();
390
ThreadCounts
counts = _separated.counts;
469
ThreadCounts
counts = _separated.counts;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\PortableThreadPool.GateThread.cs (3)
151
ThreadCounts
counts = threadPoolInstance._separated.counts;
161
ThreadCounts
newCounts = counts;
165
ThreadCounts
countsBeforeUpdate =
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\PortableThreadPool.ThreadCounts.cs (15)
14
private struct ThreadCounts : IEquatable<
ThreadCounts
>
142
public
ThreadCounts
InterlockedSetNumThreadsGoal(short value)
146
ThreadCounts
counts = this;
149
ThreadCounts
newCounts = counts;
152
ThreadCounts
countsBeforeUpdate = InterlockedCompareExchange(newCounts, counts);
162
public
ThreadCounts
VolatileRead() => new ThreadCounts(Volatile.Read(ref _data));
164
public
ThreadCounts
InterlockedCompareExchange(
ThreadCounts
newCounts,
ThreadCounts
oldCounts)
176
public static bool operator ==(
ThreadCounts
lhs,
ThreadCounts
rhs) => lhs._data == rhs._data;
177
public static bool operator !=(
ThreadCounts
lhs,
ThreadCounts
rhs) => lhs._data != rhs._data;
179
public override bool Equals([NotNullWhen(true)] object? obj) => obj is
ThreadCounts
other && Equals(other);
180
public bool Equals(
ThreadCounts
other) => _data == other._data;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\PortableThreadPool.WorkerThread.cs (9)
190
ThreadCounts
counts = threadPoolInstance._separated.counts;
202
ThreadCounts
newCounts = counts;
210
ThreadCounts
oldCounts =
244
ThreadCounts
oldCounts = threadPoolInstance._separated.counts;
245
ThreadCounts
newCounts = oldCounts;
263
ThreadCounts
oldCounts, newCounts;
306
ThreadCounts
counts = threadPoolInstance._separated.counts;
318
ThreadCounts
newCounts = counts;
321
ThreadCounts
oldCounts = threadPoolInstance._separated.counts.InterlockedCompareExchange(newCounts, counts);