| Allegro CL version 10.0 Unrevised from 9.0 to 10.0. 9.0 version |
Arguments: struct
It is normal for the system to interrupt execution of a process many times during its execution. This is transparent to the process and usually it is not necessary for the process to know when its execution is suspended and resumed. However, if the resume-hook and the suspend-hook (accessed by process-suspend-hook) are true, they should be functions of no arguments which are called on process each time the scheduler resumes or suspends its execution.
In the native threads implementation, a process can release the heap for another process to run even though the first process is not truly suspending. A foreign call can release the heap, after which it may block, e.g., in a GetMessage call in windows, or continue to process in the background outside the lisp heap. In the native-threads model the suspend-hook is called whenever a process releases the heap and the resume-hook is called whenever it reacquires the heap.
Note that the resume hook is not called when a process is first started, nor the suspend hook when its computation completes. If execution of the hooks at these times is needed, they must be called explicitly by the process' computation.
These hooks are primarily intended for window systems which may need to be informed about process switches in order to track changes of I/O streams. Use for other purposes may conflict with this usage.
Currently a programmer can set a process's process-suspend-hook and be sure that whenever the process's execution is interrupted and another process allowed to run, the hook will get executed. Similarly, when a process regains control after another process has been running, its process-resume-hook, if any, will be run before its execution continues.
Unfortunately, suspend-hooks and resume-hooks cause problems for native thread implementations and other proposed enhancements in the multiprocessing model.
Therefore, these features will likely be removed in the next release. If you use these features, please contact [email protected] so we can assist you in providing alternatives when these features are removed.
See multiprocessing.htm for general information on multiprocessing in Allegro CL.
Copyright (c) 1998-2019, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 9.0 page.
Created 2015.5.21.
| Allegro CL version 10.0 Unrevised from 9.0 to 10.0. 9.0 version |