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

◆ WaitAsync() [2/2]

Task< bool > System.Threading.SemaphoreSlim.WaitAsync ( int millisecondsTimeout,
CancellationToken cancellationToken )
inline

Definition at line 123 of file SemaphoreSlim.cs.

124 {
125 this.CheckDispose();
126 if (cancellationToken != null)
127 {
128 return Task.FromCancellation(cancellationToken);
129 }
130 object lockObj = this.m_lockObj;
131 int currentCount = this.m_currentCount;
132 int currentCount2 = this.m_currentCount;
133 ManualResetEvent waitHandle = this.m_waitHandle;
134 if (waitHandle != null && this.m_currentCount == 0)
135 {
136 bool flag = this.m_waitHandle.Reset();
137 }
138 long num = 0L;
139 if (num == 0L && waitHandle != null)
140 {
141 while (num == 0L)
142 {
143 }
145 return task;
146 }
147 throw new OutOfMemoryException();
148 }
class f__AnonymousType0<< Count > j__TPar
static Task FromCancellation(CancellationToken cancellationToken)
Definition Task.2.cs:1585

References System.Threading.SemaphoreSlim.CheckDispose(), System.Threading.Tasks.Task< TResult >.FromCancellation(), j__TPar, System.L, System.Threading.SemaphoreSlim.m_currentCount, System.Threading.SemaphoreSlim.m_lockObj, System.Threading.SemaphoreSlim.m_waitHandle, System.Threading.EventWaitHandle.Reset(), and System.task.