← Interactive API Explorer
Namespace: System.Threading

WaitHandle

Encapsulates operating system-specific objects that wait for exclusive access to shared resources.

Methods (3)

bool WaitOne(TimeSpan)
Blocks the current thread until the current instance receives a signal, using a TimeSpan to specify the time interval.
ParameterDescription
timeoutA TimeSpan that represents the number of milliseconds to wait, or a TimeSpan that represents -1 milliseconds to wait indefinitely.
Returns: true if the current instance receives a signal; otherwise, false.
bool WaitOne(Int32)
Blocks the current thread until the current WaitHandle receives a signal, using a 32-bit signed integer to specify the time interval in milliseconds.
ParameterDescription
millisecondsTimeoutThe number of milliseconds to wait, or Infinite (-1) to wait indefinitely.
Returns: true if the current instance receives a signal; otherwise, false.
bool WaitOne
Blocks the current thread until the current WaitHandle receives a signal.
Returns: true if the current instance receives a signal. If the current instance is never signaled, Boolean) never returns.