The main exception is that for processes that wait with process-wait for something to happen, a process with higher priority is likely to wake up earlier, but even then it is not guaranteed.
If there is a runnable process with priority P, then no processes with priority less than P will run. When there are runnable processes with equal priority, they will be scheduled in a round-robin manner.
If a process with priority P is running and a blocked process with priority greater than P becomes runnable, the second process will run when the scheduler is next invoked (either explicitly or at the next preemption tick).
(mp:change-process-priority proc-1 10)
Another way to specify the priority is to create the process with process-run-function, passing the keyword
symeval-in-process to read the value of a dynamically bound symbol in a given process.
symeval-in-process is mostly intended for debugging. Do not call it while the thread is actually running.
Suppose a pool of "worker" processes is managed by a "manager" process. A process in the worker pool marks itself as available for work, and then calls process-stop. The manager process later finds a worker process that is marked as available for work, puts the work in a place known to the worker process, and then calls process-unstop on the worker process.
For this scheme to work properly, the check of whether the worker is available needs to include a call to
process-stopped-p. Otherwise, it is possible for the following sequence of events to occur:
LispWorks User Guide and Reference Manual - 13 Feb 2015