NextPrevUpTopContentsIndex

16.4.1 Timers and multiprocessing

Timers run in unpredictable threads, therefore it is not safe to run code that interacts with the user directly. The recommended solution is something like

(mp:schedule-timer-relative
 (mp:make-timer 'capi:execute-with-interface
                interface
                'capi:display-message "Time's up")
 5)

or

(mp:schedule-timer
 (mp:make-timer 'capi:execute-with-interface
                interface
                'capi:display-message "Lunchtime")
 (* 4 60 60))

where interface is an existing CAPI interface on the screen.

Timers actually run in the process that is current when the scheduled time is reached. This is likely to be The Idle Process in cases where LispWorks is sleeping, but it is inherently unpredictable.


LispWorks User Guide - 11 Mar 2008

NextPrevUpTopContentsIndex