| Allegro CL version 10.1 Unrevised from 10.0 to 10.1. 10.0 version |
Arguments: &optional process
This function allows processes other than the running (and hence calling) process to run. All other processes of equal or higher priority to the calling process will have a chance to run before the calling process is next run. This function is useful when a process seems to be using all available resources. For use in an SMP Lisp, see the notes below.
The optional process argument is ignored (in an earlier multiprocessing implementation, it specified the process to be run next). If you want a specific process to run next, you need to make sure it is the highest-priority process that is ready to run.
In an SMP Lisp on a machine with multiple cores, this function is less useful because multiple processes can run simultaneously. Even in an SMP lisp, there may be more Lisp processes than there are available cores. In this case process-allow-schedule calls the host OS's yield function, allowing OS to assign that core to another ready lisp thread.
Before SMP, process-allow-schedule worked on the theory that an application might have specific points in its processing cycle that were better suited to allowing another process to run than the random point selected by the quantum timeout. Points where there was a minimum of temporary data that would clog the next gc, for example, or points where a minimum number of locks were held.
In SMP, to have a successful multi-threaded app that actually uses multiple cores, these sorts of considerations need to be part of the application design. Calling process-allow-schedule in such a situation is probably benign, and may in rare cases be a help, but will not usually solve any serious problems.
See multiprocessing.htm for general information on multiprocessing in Allegro CL.
Copyright (c) 1998-2022, Franz Inc. Lafayette, CA., USA. All rights reserved.
This page was not revised from the 10.0 page.
Created 2019.8.20.
| Allegro CL version 10.1 Unrevised from 10.0 to 10.1. 10.0 version |