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

◆ Unregister()

bool System.Threading.RegisteredWaitHandle.Unregister ( WaitHandle waitObject)
inline

Definition at line 79 of file RegisteredWaitHandle.cs.

80 {
81 if (ThreadPool.UsePortableThreadPool)
82 {
83 return UnregisterPortable(waitObject);
84 }
85 s_callbackLock.Acquire();
86 try
87 {
89 {
90 return false;
91 }
94 {
96 _releaseHandle = false;
97 }
98 }
99 finally
100 {
101 s_callbackLock.Release();
102 }
103 GC.SuppressFinalize(this);
104 return true;
105 }
bool UnregisterPortable(WaitHandle waitObject)
static bool UnregisterWaitNative(IntPtr handle, SafeHandle waitObject)
static readonly LowLevelLock s_callbackLock

References System.Threading.RegisteredWaitHandle._nativeRegisteredWaitHandle, System.Threading.RegisteredWaitHandle._releaseHandle, System.Runtime.InteropServices.SafeHandle.DangerousRelease(), System.Threading.RegisteredWaitHandle.Handle, System.Threading.RegisteredWaitHandle.InvalidHandleValue, System.Threading.RegisteredWaitHandle.IsValidHandle(), System.Threading.RegisteredWaitHandle.s_callbackLock, System.GC.SuppressFinalize(), System.Threading.RegisteredWaitHandle.UnregisterPortable(), System.Threading.RegisteredWaitHandle.UnregisterWaitNative(), and System.Threading.ThreadPool.UsePortableThreadPool.

Referenced by System.Net.NetworkInformation.Ping.UnregisterWaitHandle().