public void ReleaseMutex() { // The field value is modifiable via the public <see cref="WaitHandle.SafeWaitHandle"/> property, save it locally // to ensure that one instance is used in all places in this method SafeWaitHandle waitHandle = _waitHandle; if (waitHandle == null) { ThrowInvalidHandleException(); } waitHandle.DangerousAddRef(); try { WaitSubsystem.ReleaseMutex(waitHandle.DangerousGetHandle()); } finally { waitHandle.DangerousRelease(); } }
private static void ReleaseMutexCore(IntPtr handle) { WaitSubsystem.ReleaseMutex(handle); }