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

Mono.Unix.UnixSignal.WaitAny Method

Blocks the current thread until one of the Mono.Unix.UnixSignal instances within signals has a non-zero UnixSignal.Count or the timeout expires.

public static int WaitAny (UnixSignal[] signals, TimeSpan timeout)

Parameters

signals
A Mono.Unix.UnixSignal array containing the Mono.Unix.UnixSignal instances to wait on.
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.

Returns

If the method doesn't timeout, returns a int set to the index of the element in signals that received a signal. If the method does timeout, then timeout's TimeSpan.TotalMilliseconds value cast to a int is returned.

Exceptions

TypeReason
ArgumentNullExceptionsignals is null.
ArgumentOutOfRangeExceptiontimeout's TimeSpan.TotalMilliseconds property is less than -1 or greater than int.MaxValue.
InvalidOperationException One of the Mono.Unix.UnixSignal instances within signals was disposed.

Remarks

This is equivalent to UnixSignal.WaitAny(signals, timeout.TotalMilliseconds).

Requirements

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