5 writes to _maxThreads
System.Private.CoreLib (5)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\PortableThreadPool.cs (5)
143
_maxThreads
= HasForcedMaxThreads ? ForcedMaxWorkerThreads : DefaultMaxWorkerThreadCount;
146
_maxThreads
= MaxPossibleThreadCount;
150
_maxThreads
= _minThreads;
296
_maxThreads
= newMaxThreads;
320
workerThreads = Volatile.Read(ref
_maxThreads
);
13 references to _maxThreads
System.Private.CoreLib (13)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\PortableThreadPool.Blocking.cs (3)
28
: (short)Math.Min((ushort)(_minThreads + _numBlockedThreads), (ushort)
_maxThreads
);
157
(short)Math.Min((ushort)(_minThreads + BlockingConfig.ThreadsToAddWithoutDelay), (ushort)
_maxThreads
);
164
Math.Max(configuredMaxThreadsWithoutDelay, Math.Min(counts.NumExistingThreads,
_maxThreads
));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\PortableThreadPool.cs (8)
144
if (
_maxThreads
> MaxPossibleThreadCount)
148
else if (
_maxThreads
< _minThreads)
160
(ushort)
_maxThreads
,
190
if (workerThreads >
_maxThreads
)
236
(ushort)
_maxThreads
,
291
if (newMaxThreads ==
_maxThreads
)
306
(ushort)
_maxThreads
,
327
workerThreads = Math.Max(0,
_maxThreads
- counts.NumProcessingWork);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\PortableThreadPool.GateThread.cs (1)
153
counts.NumProcessingWork < threadPoolInstance.
_maxThreads
&&
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\PortableThreadPool.HillClimbing.cs (1)
329
int maxThreads = threadPoolInstance.
_maxThreads
;