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

◆ Release() [2/2]

int System.Threading.SemaphoreSlim.Release ( int releaseCount)
inline

Definition at line 231 of file SemaphoreSlim.cs.

232 {
233 this.CheckDispose();
234 Monitor.Enter(this.m_lockObj, releaseCount != 0);
235 int currentCount = this.m_currentCount;
236 int maxCount = this.m_maxCount;
237 int waitCount = this.m_waitCount;
238 Monitor.PulseAll(this.m_lockObj);
239 Monitor.Pulse(this.m_lockObj);
241 if (asyncHead != null)
242 {
244 if (asyncHead2 != null)
245 {
246 bool flag = this.RemoveAsyncWaiter(asyncHead2);
247 if (asyncHead == null)
248 {
249 }
250 long num = 0L;
251 ThreadPool.UnsafeQueueCustomWorkItem(asyncHead2, num != 0L);
252 }
253 }
254 ManualResetEvent waitHandle = this.m_waitHandle;
255 long num2;
256 if (currentCount == 0 && waitHandle != null)
257 {
258 bool flag2 = this.m_waitHandle.Set();
259 num2 = 0L;
260 }
261 if (asyncHead != null)
262 {
263 }
264 if (num2 == 0L)
265 {
266 string resourceString = SemaphoreSlim.GetResourceString("The releaseCount argument must be greater than zero.");
267 }
268 throw new OutOfMemoryException();
269 }
class f__AnonymousType0<< Count > j__TPar
bool RemoveAsyncWaiter(SemaphoreSlim.TaskNode task)
SemaphoreSlim.TaskNode m_asyncHead

References System.Threading.SemaphoreSlim.CheckDispose(), System.Threading.Monitor.Enter(), System.Threading.SemaphoreSlim.GetResourceString(), j__TPar, System.L, System.Threading.SemaphoreSlim.m_asyncHead, System.Threading.SemaphoreSlim.m_currentCount, System.Threading.SemaphoreSlim.m_lockObj, System.Threading.SemaphoreSlim.m_maxCount, System.Threading.SemaphoreSlim.m_waitCount, System.Threading.SemaphoreSlim.m_waitHandle, System.Threading.Monitor.Pulse(), System.Threading.Monitor.PulseAll(), System.Threading.SemaphoreSlim.RemoveAsyncWaiter(), System.Threading.EventWaitHandle.Set(), and System.Threading.ThreadPool.UnsafeQueueCustomWorkItem().