A positive number.
A function designator.
Arguments passed to function.
current-process-pause sleeps for time seconds, but wakes up if another process did something to wake up the current process (normally this is process-poke, but it can also be process-interrupt, process-stop, process-unstop or process-kill).
If function is passed just before going to sleep,
current-process-pause applies function to args, and if this returns a true value
current-process-pause returns it immediately. function and args are not used otherwise. If another process calls process-poke on the current process after setting something that causes function to return true, it guarantees that
current-process-pause will return immediately without sleeping.
current-process-pauseis applied only once, and within the dynamic scope of
current-process-pause. It therefore does not have any of the restrictions that the wait-function of process-wait has.
:pokedand the process being poked in some way.
:pokedin a situation when it seems unexpected. For example, if the current process does:
the call to
current-process-pause may return poked, because a process that sent an event to the mailbox tried to poke the current process, and by the time this poke happened the current process is already inside
current-process-pause. The only guarantees are that
current-process-pause does not wait when a poke occurred, and that it returns
nil only when it paused the full time.
check-for-need-cleanup is passed to
current-process-pause, because another process may call process-poke after
current-process-pause was called but before it went to sleep. If
check-for-need-cleanup was not passed,
current-process-pause would unnecessarily sleep the whole 60 seconds in this case. The same thing could be implemented by process-wait-with-timeout, but the implementation above does not require a wait function that can run in another dynamic scope repeatedly at arbitrary times, and it uses much less system resources. It is also easier to debug.
LispWorks User Guide and Reference Manual - 20 Sep 2017