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

◆ WaitOneNoCheck()

bool System.Threading.WaitHandle.WaitOneNoCheck ( int millisecondsTimeout)
inlineprivate

Definition at line 132 of file WaitHandle.cs.

133 {
134 SafeWaitHandle safeWaitHandle = _waitHandle ?? throw new ObjectDisposedException(null, SR.ObjectDisposed_Generic);
135 bool success = false;
136 try
137 {
138 safeWaitHandle.DangerousAddRef(ref success);
139 SynchronizationContext current = SynchronizationContext.Current;
140 int num = ((current == null || !current.IsWaitNotificationRequired()) ? WaitOneCore(safeWaitHandle.DangerousGetHandle(), millisecondsTimeout) : current.Wait(new IntPtr[1] { safeWaitHandle.DangerousGetHandle() }, waitAll: false, millisecondsTimeout));
141 if (num == 128)
142 {
143 throw new AbandonedMutexException();
144 }
145 return num != 258;
146 }
147 finally
148 {
149 if (success)
150 {
151 safeWaitHandle.DangerousRelease();
152 }
153 }
154 }
void DangerousAddRef(ref bool success)
Definition SafeHandle.cs:76
static int WaitOneCore(IntPtr waitHandle, int millisecondsTimeout)
SafeWaitHandle _waitHandle
Definition WaitHandle.cs:14

References System.Threading.WaitHandle._waitHandle, System.Threading.SynchronizationContext.Current, System.Runtime.InteropServices.SafeHandle.DangerousAddRef(), System.Runtime.InteropServices.SafeHandle.DangerousGetHandle(), System.Runtime.InteropServices.SafeHandle.DangerousRelease(), System.Threading.SynchronizationContext.IsWaitNotificationRequired(), System.millisecondsTimeout, System.SR.ObjectDisposed_Generic, System.Threading.SynchronizationContext.Wait(), and System.Threading.WaitHandle.WaitOneCore().

Referenced by System.Threading.WaitHandle.WaitOne(), System.Threading.WaitHandle.WaitOne(), System.Threading.WaitHandle.WaitOne(), and System.Threading.WaitHandle.WaitOne().