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

NextPrevUpTopContentsIndex

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 timeout, in seconds.

wait-function

A function to test.

wait-arguments

The arguments to apply to wait-function.

Values

bool

A boolean.

Description

This function 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 make the wait-function return true.

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

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
Process Waiting and communication between processes


LispWorks User Guide and Reference Manual - 13 Feb 2015

NextPrevUpTopContentsIndex