LispWorks User Guide and Reference Manual > 35 The MP Package

NextPrevUpTopContentsIndex

process-poke

Function
Summary

Makes a waiting process call its wait function.

Package

mp

Signature

process-poke process => result

Arguments

process

A process.

Values

result

A boolean.

Description

If the process process is waiting, process-poke causes it to run its wait-function as soon as possible, and if the wait function returns true, the process returns from process-wait.

This has an effect only in SMP LispWorks, where the running of the wait-function can happen asynchronously.

process-poke can be used to avoid delays that happen because the next execution of the wait-function does not happen immediately. Without the call to process-poke , the process may wake up after some delay.

process-poke returns t if it actually poked the process or nil otherwise (when the process is not waiting or is stopped).

Example
(my-queue-an-event-for-the-workers)
 
(dolist (process *my-worker-processes*)
  (when (mp:process-poke process) (return))
See also

 


LispWorks User Guide and Reference Manual - 22 Dec 2009

NextPrevUpTopContentsIndex