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

◆ GetAndResetHighWatermarkCountOfThreadsProcessingUserCallbacks()

short System.Threading.PortableThreadPool.GetAndResetHighWatermarkCountOfThreadsProcessingUserCallbacks ( )
inlineprivate

Definition at line 1871 of file PortableThreadPool.cs.

1872 {
1873 CountsOfThreadsProcessingUserCallbacks countsOfThreadsProcessingUserCallbacks = _countsOfThreadsProcessingUserCallbacks;
1874 CountsOfThreadsProcessingUserCallbacks countsOfThreadsProcessingUserCallbacks2;
1875 while (true)
1876 {
1877 CountsOfThreadsProcessingUserCallbacks newCounts = countsOfThreadsProcessingUserCallbacks;
1878 newCounts.ResetHighWatermark();
1879 countsOfThreadsProcessingUserCallbacks2 = _countsOfThreadsProcessingUserCallbacks.InterlockedCompareExchange(newCounts, countsOfThreadsProcessingUserCallbacks);
1880 if (countsOfThreadsProcessingUserCallbacks2 == countsOfThreadsProcessingUserCallbacks || countsOfThreadsProcessingUserCallbacks2.HighWatermark == countsOfThreadsProcessingUserCallbacks2.Current)
1881 {
1882 break;
1883 }
1884 countsOfThreadsProcessingUserCallbacks = countsOfThreadsProcessingUserCallbacks2;
1885 }
1886 return countsOfThreadsProcessingUserCallbacks2.HighWatermark;
1887 }
CountsOfThreadsProcessingUserCallbacks _countsOfThreadsProcessingUserCallbacks
CountsOfThreadsProcessingUserCallbacks InterlockedCompareExchange(CountsOfThreadsProcessingUserCallbacks newCounts, CountsOfThreadsProcessingUserCallbacks oldCounts)

References System.Threading.PortableThreadPool._countsOfThreadsProcessingUserCallbacks, System.Threading.PortableThreadPool.CountsOfThreadsProcessingUserCallbacks.Current, System.Threading.PortableThreadPool.CountsOfThreadsProcessingUserCallbacks.HighWatermark, System.Threading.PortableThreadPool.CountsOfThreadsProcessingUserCallbacks.InterlockedCompareExchange(), and System.Threading.PortableThreadPool.CountsOfThreadsProcessingUserCallbacks.ResetHighWatermark().

Referenced by System.Threading.PortableThreadPool.GateThread.GateThreadStart().