Export (0) Print
Expand All

EventWaitHandle.WaitOne Method (Int32, Boolean)

Blocks the current thread until the current EventWaitHandle receives a signal, using a 32-bit signed integer to measure the time interval and specifying whether to exit the synchronization domain before the wait. For complete documentation, see the base class topic, WaitHandle.WaitOne(Int32, Boolean).

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

public override bool WaitOne(
	int millisecondsTimeout,
	bool exitContext
)

Parameters

millisecondsTimeout
Type: System.Int32
The number of milliseconds to wait, or Timeout.Infinite (-1) to wait indefinitely.
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.

Important noteImportant

This member override applies only to the versions listed in "Version Information" later in this topic. For other versions and complete documentation, see the base class topic, WaitHandle.WaitOne(Int32, Boolean).

Community Additions

Show:
© 2014 Microsoft