System.Threading.WaitHandle.SignalAndWait Method

Signals one System.Threading.WaitHandle and waits on another.

Syntax

public static bool SignalAndWait (WaitHandle toSignal, WaitHandle toWaitOn)

Parameters

toSignal
The System.Threading.WaitHandle to signal.
toWaitOn
The System.Threading.WaitHandle to wait on.

Returns

true if both the signal and the wait complete successfully; if the wait does not complete, the method does not return.

Remarks

This operation is not guaranteed to be atomic. After the current thread signals toSignal but before it waits on toWaitOn, a thread that is running on another processor might signal toWaitOn or wait on it.

Requirements

Namespace: System.Threading
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0