Cond.waitUntil

Waits until either cond is signalled or end_time has passed. As with g_cond_wait() it is possible that a spurious or stolen wakeup could occur. For that reason, waiting on a condition variable should always be in a loop, based on an explicitly-checked predicate. TRUE is returned if the condition variable was signalled (or in the case of a spurious wakeup). FALSE is returned if end_time has passed. The following code shows how to correctly perform a timed wait on a condition variable (extended the example presented in the Since 2.32

class Cond
int
waitUntil

Parameters

mutex Mutex

a GMutex that is currently locked

endTime long

the monotonic time to wait until

Return Value

Type: int

TRUE on a signal, FALSE on a timeout

Meta