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

◆ RegisterWaitForSingleObject() [1/5]

static RegisteredWaitHandle System.Threading.ThreadPool.RegisterWaitForSingleObject ( WaitHandle waitObject,
WaitOrTimerCallback callBack,
object state,
uint millisecondsTimeOutInterval,
bool executeOnlyOnce,
bool flowExecutionContext )
inlinestaticprivate

Definition at line 203 of file ThreadPool.cs.

204 {
205 if (waitObject == null)
206 {
207 throw new ArgumentNullException("waitObject");
208 }
209 if (callBack == null)
210 {
211 throw new ArgumentNullException("callBack");
212 }
213 RegisteredWaitHandle registeredWaitHandle = new RegisteredWaitHandle(waitObject, new _ThreadPoolWaitOrTimerCallback(callBack, state, flowExecutionContext), (int)millisecondsTimeOutInterval, !executeOnlyOnce);
214 registeredWaitHandle.OnBeforeRegister();
216 {
217 PortableThreadPool.ThreadPoolInstance.RegisterWaitHandle(registeredWaitHandle);
218 }
219 else
220 {
222 registeredWaitHandle.SetNativeRegisteredWaitHandle(nativeRegisteredWaitHandle);
223 }
225 }
static readonly bool UsePortableThreadPool
Definition ThreadPool.cs:12
static IntPtr RegisterWaitForSingleObjectNative(WaitHandle waitHandle, object state, uint timeOutInterval, bool executeOnlyOnce, RegisteredWaitHandle registeredWaitHandle)

References System.callBack, System.Threading.ThreadPool.RegisterWaitForSingleObjectNative(), System.state, System.Threading.PortableThreadPool.ThreadPoolInstance, and System.Threading.ThreadPool.UsePortableThreadPool.

Referenced by System.Diagnostics.Process.EnsureWatchingForExit(), System.Threading.Tasks.TaskFactory< TResult >.FromAsyncImpl(), System.Threading.ThreadPool.RegisterWaitForSingleObject(), System.Threading.ThreadPool.RegisterWaitForSingleObject(), System.Threading.ThreadPool.RegisterWaitForSingleObject(), System.Threading.ThreadPool.RegisterWaitForSingleObject(), System.Net.NetworkInformation.Ping.RegisterWaitHandle(), System.Net.NetworkInformation.NetworkChange.AddressChangeListener.StartHelper(), System.Threading.ThreadPool.UnsafeRegisterWaitForSingleObject(), System.Threading.ThreadPool.UnsafeRegisterWaitForSingleObject(), System.Threading.ThreadPool.UnsafeRegisterWaitForSingleObject(), and System.Threading.ThreadPool.UnsafeRegisterWaitForSingleObject().