Mono Class Library: Mono.Unix.UnixSignal Overview | Members

Mono.Unix.UnixSignal.WaitOne Method

Blocks the current thread until the curent instance has a non-zero UnixSignal.Count or the timeout expires.

public override bool WaitOne (TimeSpan timeout, bool exitContext)

Parameters

timeout
A TimeSpan specifying how long the method should wait before returning. Use a TimeSpan with a TimeSpan.TotalMilliseconds value of -1 for an infinite timeout.
exitContext
This parameter must be false.

Returns

Returns true when the current instance receives a signal, otherwise false is returned if the timeout is exceeded.

Exceptions

TypeReason
ArgumentOutOfRangeExceptiontimeout's TimeSpan.TotalMilliseconds property is less than -1 or greater than int.MaxValue.
InvalidOperationExceptionexitContext is true.
ObjectDisposedException The current instance has already been disposed.

Remarks

The caller of this method blocks for up to timeout.TotalMilliseconds milliseconds for the UnixSignal.Signum signal to be received by the current process and the UnixSignal.Count property to become non-zero.

Requirements

Namespace: Mono.Unix
Assembly: Mono.Posix (in Mono.Posix.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0