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

◆ InterlockedSetNumThreadsGoal()

ThreadCounts System.Threading.PortableThreadPool.ThreadCounts.InterlockedSetNumThreadsGoal ( short value)
inline

Definition at line 722 of file PortableThreadPool.cs.

723 {
724 ThreadCounts threadCounts = this;
725 ThreadCounts threadCounts2;
726 while (true)
727 {
728 threadCounts2 = threadCounts;
729 threadCounts2.NumThreadsGoal = value;
730 ThreadCounts threadCounts3 = InterlockedCompareExchange(threadCounts2, threadCounts);
731 if (threadCounts3 == threadCounts)
732 {
733 break;
734 }
735 threadCounts = threadCounts3;
736 }
737 return threadCounts2;
738 }
ThreadCounts InterlockedCompareExchange(ThreadCounts newCounts, ThreadCounts oldCounts)

References System.Threading.PortableThreadPool.ThreadCounts.InterlockedCompareExchange(), and System.value.

Referenced by System.Threading.PortableThreadPool.AdjustMaxWorkersActive(), System.Threading.PortableThreadPool.PerformBlockingAdjustment(), System.Threading.PortableThreadPool.SetMaxThreads(), and System.Threading.PortableThreadPool.SetMinThreads().