condition_wait


Description:

public bool condition_wait (IOCondition condition, int64 timeout, Cancellable? cancellable = null) throws Error

Waits for up to timeout microseconds for condition to become true on this.

If the condition is met, true is returned.

If cancellable is cancelled before the condition is met, or if timeout is reached before the condition is met, then false is returned and throws is set appropriately ( g_io_error_cancelled or g_io_error_timed_out).

Parameters:

this

a DatagramBased

condition

a IOCondition mask to wait for

timeout

the maximum time (in microseconds) to wait, 0 to not block, or -1 to block indefinitely

cancellable

a Cancellable

Returns:

true if the condition was met, false otherwise