LispWorks User Guide and Reference Manual > 35 The MP Package

NextPrevUpTopContentsIndex

wait-processing-events

Function
Summary

Waits processing events.

Signature

wait-processing-events timeout &key wait-reason wait-function
wait-args => result

Package

mp

Arguments

timeout

A number.

wait-reason

A string.

wait-function

A function designator.

wait-args

A list.

Values

result

t or nil

Description

The function wait-processing-events does not return until one of two conditions is met:

wait-reason provides the value returned by process-whostate when called on the current process.

wait-function is called periodically with arguments wait-args . wait-function may be called many times and in several places. Therefore wait-function should be fast and make no assumptions about its dynamic context.

wait-processing-events processes all events sent to the current process, including system events such as window messages on Microsoft Windows, and objects sent by other processes via process-send. In the latter case, the objects must be lists of the form ( function . arguments ) , which cause function to be applied to arguments (the values are discarded).

wait-processing-events is a useful alternative to sleep in a situation where you want to process events to see window updates and so on.

See also

process-send
process-whostate


LispWorks User Guide and Reference Manual - 22 Dec 2009

NextPrevUpTopContentsIndex