WaitHandle.WaitOne Method (Int32, Boolean)
When overridden in a derived class, this method blocks the current thread until the current WaitHandle object (wait handle) receives a signal, using a 32-bit signed integer to specify the time interval and indicating whether to exit the synchronization domain before the wait.
Namespace: System.Threading
Assembly: mscorlib (in mscorlib.dll)
Syntax
[MethodImplAttribute]
public virtual bool WaitOne (
intmillisecondsTimeout,
boolexitContext
)
Parameters
- millisecondsTimeout
The number of milliseconds you want the system to wait, or Timeout.Infinite (-1) if you want it to wait indefinitely. - exitContext
A parameter you should set to true to exit the synchronization domain for the context before the wait (in a synchronized context) and then reacquire it; otherwise, set this parameter to false.
Return Value
true if the current wait handle receives a signal; otherwise, false.
Version Information
Available in .NET Micro Framework version 2.0, 2.5
See Also
Reference
WaitHandle Class
WaitHandle Members
System.Threading Namespace