condition-variable-waitPortable Threadscurrent-threadcondition-variable-wait-with-timeoutGoTo Top

condition-variable-wait-with-timeout   condition-variable seconds => boolean[Function]

Purpose
Block the current thread on condition-variable or until seconds seconds have elapsed.

Package   :portable-threads

Module   :portable-threads

Arguments and values

condition-variable     A condition variable
seconds     A number
boolean     A generalized boolean

Returns
True if condition-variable is unblocked before seconds seconds have elapsed; nil if the timeout has occurred.

Errors
The lock (or recursive lock) associated with condition-variable is not held by the executing process.

Threads (multiprocessing) is not supported on the Common Lisp implementation.

See also
    condition-variable-broadcast
    condition-variable-signal
    condition-variable-wait
    make-condition-variable
    with-lock-held
    without-lock-held

Example
Acquire the condition-variable lock and then wait until signaled by another thread or until 5 seconds have elapsed:

  (with-lock-held (condition-variable)
    (condition-variable-wait-with-timeout condition-variable 5))


The GBBopen Project


condition-variable-waitPortable Threadscurrent-threadcondition-variable-wait-with-timeoutGoTo Top