System::Threading::WaitHandle::WaitOne method

WaitHandle::WaitOne() method

Waits for the handle to fire for unlimited period.

virtual bool System::Threading::WaitHandle::WaitOne()

ReturnValue

Always returns true as no timeout occurs.

See Also

WaitHandle::WaitOne(int) method

Waits for the handle to fire.

virtual bool System::Threading::WaitHandle::WaitOne(int millisecondsTimeout)
ParameterTypeDescription
millisecondsTimeoutintTimeout to wait for, in milliseconds; -1 means infinite waiting, 0 means check-and-return, positive values are timeouts.

ReturnValue

True if handle fired, false if timeout exceeded.

See Also

WaitHandle::WaitOne(TimeSpan) method

Waits for the handle to fire.

virtual bool System::Threading::WaitHandle::WaitOne(TimeSpan timeout)
ParameterTypeDescription
timeoutTimeSpanA System::TimeSpan that represents the number of milliseconds to wait, or a System::TimeSpan that represents -1 milliseconds to wait indefinitely.

ReturnValue

True if handle fired, false if timeout exceeded.

See Also

WaitHandle::WaitOne(int, bool) method

Waits for the handle to fire.

virtual bool System::Threading::WaitHandle::WaitOne(int millisecondsTimeout, bool exitContext)
ParameterTypeDescription
millisecondsTimeoutintTimeout to wait for, in milliseconds; -1 means infinite waiting, 0 means check-and-return, positive values are timeouts.
exitContextboolIf true, waiting should drop the lock on the handle before waiting for it.

ReturnValue

True if handle fired, false if timeout exceeded.

See Also