Share via


WaitOne Method (Int32, Boolean)

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Blocks the current thread until the current WaitHandle receives a signal, using a 32-bit signed integer to specify the time interval and specifying whether to exit the synchronization domain before the wait.

Namespace:  System.Threading
Assembly:  mscorlib (in mscorlib.dll)

Syntax

'Declaration
Public Overridable Function WaitOne ( _
    millisecondsTimeout As Integer, _
    exitContext As Boolean _
) As Boolean
public virtual bool WaitOne(
    int millisecondsTimeout,
    bool exitContext
)
public:
virtual bool WaitOne(
    int millisecondsTimeout, 
    bool exitContext
)
abstract WaitOne : 
        millisecondsTimeout:int * 
        exitContext:bool -> bool 
override WaitOne : 
        millisecondsTimeout:int * 
        exitContext:bool -> bool 
public function WaitOne(
    millisecondsTimeout : int, 
    exitContext : boolean
) : boolean

Parameters

  • exitContext
    Type: System. . :: . .Boolean
    true to exit the synchronization domain for the context before the wait (if in a synchronized context), and reacquire it afterward; otherwise, false.

Return Value

Type: System. . :: . .Boolean
true if the current instance receives a signal; otherwise, false.

.NET Framework Security

See Also

Reference

WaitHandle Class

WaitOne Overload

System.Threading Namespace