terraria-cpp2il-methodrecon v1.4.4.9
Terraria mobile dump, with reconstructed method body. Dump with CallAnalysis: https://infinitynichto.github.io/terraria-cpp2il
Loading...
Searching...
No Matches

◆ Wait() [3/3]

bool System.Threading.SemaphoreSlim.Wait ( int millisecondsTimeout,
CancellationToken cancellationToken )
inline

Definition at line 50 of file SemaphoreSlim.cs.

51 {
52 int num2;
53 for (;;)
54 {
55 int num = 1;
56 this.CheckDispose();
57 if (millisecondsTimeout != 0)
58 {
60 }
61 if (this.m_currentCount == 0)
62 {
63 }
64 if (num == 0)
65 {
66 }
67 if (this.m_currentCount == 0)
68 {
69 break;
70 }
71 Monitor.Enter(this.m_lockObj, num2 != 0);
72 if (num != 0)
73 {
74 int waitCount = this.m_waitCount;
75 this.m_waitCount = num;
76 }
78 if (asyncHead != null)
79 {
80 Task<bool> task = this.WaitAsync(millisecondsTimeout, cancellationToken);
81 }
82 if (this.m_currentCount != 0)
83 {
84 goto Block_4;
85 }
86 }
87 num2 = 20;
88 bool flag;
89 return flag;
90 Block_4:
91 if (false)
92 {
97 bool flag2;
98 return flag2;
99 }
100 throw new OutOfMemoryException();
101 }
class f__AnonymousType0<< Count > j__TPar
static int TickCount
SemaphoreSlim.TaskNode m_asyncHead

References System.Threading.SemaphoreSlim.CheckDispose(), System.Threading.Monitor.Enter(), j__TPar, System.Threading.SemaphoreSlim.m_asyncHead, System.Threading.SemaphoreSlim.m_currentCount, System.Threading.SemaphoreSlim.m_lockObj, System.Threading.SemaphoreSlim.m_waitCount, System.task, System.Environment.TickCount, and System.Threading.SemaphoreSlim.WaitAsync().