System.Threading.RegisteredWaitHandle.Unregister Method

Cancels a registered wait operation issued by the ThreadPool.RegisterWaitForSingleObject(WaitHandle, WaitOrTimerCallback, object, uint, bool) method.

Syntax

[System.Runtime.InteropServices.ComVisible(true)]
public bool Unregister (WaitHandle waitObject)

Parameters

waitObject
The System.Threading.WaitHandle to be signaled.

Returns

true if the function succeeds; otherwise, false.

Remarks

If waitObject is specified, it is signaled only if the System.Threading.RegisteredWaitHandle is successfully unregistered. If a callback method is in progress when RegisteredWaitHandle.Unregister(WaitHandle) executes, waitObject is not signaled until the callback method completes. In particular, if a callback method executes RegisteredWaitHandle.Unregister(WaitHandle), waitObject is not signaled until that callback method completes.

Requirements

Namespace: System.Threading
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0