The function
condition-variable-wait
waits at most
timeout
seconds for the condition variable
condvar
to be signalled. The lock
lock
is released while waiting and claimed again before returning. The caller must be holding the lock
lock
before calling this function.
The return value
wakep
is non-nil if the signal was received or
nil
if there was a timeout. If
timeout
is
nil
,
condition-variable-wait
waits indefinitely.
If wait-reason is non-nil, it is used as the wait-reason while waiting for the signal.
timeout controls how long to wait for the signal: before returning, the function waits to claim the lock, possibly indefinitely.