Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ ShouldAdjustMaxWorkersActive()

bool System.Threading.PortableThreadPool.ShouldAdjustMaxWorkersActive ( int currentTimeMs)
inlineprivate

Definition at line 1572 of file PortableThreadPool.cs.

1573 {
1574 if (HillClimbing.IsDisabled)
1575 {
1576 return false;
1577 }
1579 uint num2 = (uint)(_separated.nextCompletedWorkRequestsTime - num);
1580 uint num3 = (uint)(currentTimeMs - num);
1581 if (num3 < num2)
1582 {
1583 return false;
1584 }
1585 ThreadCounts counts = _separated.counts;
1586 if (counts.NumProcessingWork > counts.NumThreadsGoal)
1587 {
1588 return false;
1589 }
1590 return _pendingBlockingAdjustment == PendingBlockingAdjustment.None;
1591 }
PendingBlockingAdjustment _pendingBlockingAdjustment

References System.Threading.PortableThreadPool._pendingBlockingAdjustment, System.Threading.PortableThreadPool._separated, System.Threading.PortableThreadPool.CacheLineSeparated.counts, System.Threading.PortableThreadPool.HillClimbing.IsDisabled, System.Threading.PortableThreadPool.CacheLineSeparated.nextCompletedWorkRequestsTime, System.Threading.PortableThreadPool.ThreadCounts.NumProcessingWork, System.Threading.PortableThreadPool.ThreadCounts.NumThreadsGoal, System.Threading.PortableThreadPool.CacheLineSeparated.priorCompletedWorkRequestsTime, and System.Threading.Volatile.Read().

Referenced by System.Threading.PortableThreadPool.NotifyWorkItemProgress().