All Manuals > LispWorks® User Guide and Reference Manual > 42 The MP Package

process-wait-with-timeout Function

Summary

Suspend the current process until certain conditions are true, or until a timeout expires.

Package

mp

Signature

process-wait-with-timeout wait-reason timeout &optional wait-function &rest wait-arguments => bool

Arguments
wait-reason
A string describing the reason that the process is waiting.
timeout
A non-negative real or nil.
wait-function
A function to test.
wait-arguments
The arguments to apply to wait-function.
Values
bool
A boolean.
Description

The function process-wait-with-timeout uses process-wait to suspend the current Lisp process until the predicate wait-function applied to wait-arguments returns true, or until timeout seconds have passed.

wait-function is called periodically by the scheduler, but in situations where you want more control over the timing you should consider using process-wait-local instead of process-wait and then call process-poke in the process that is expected to cause wait-function to return true.

wait-function is called with interrupts blocked. It should therefore not allow interrupts, because this could cause deadlocks.

wait-reason is used as the wait-reason while waiting.

bool is nil if the timeout occurred before wait-function returned true. bool is true otherwise.

See also

process-join
process-poke
process-wait
process-wait-local-with-timeout
process-wait-local-with-timeout-and-periodic-checks
19.6 Process Waiting and communication between processes


LispWorks® User Guide and Reference Manual - 01 Dec 2021 19:30:51