Normally code compiled at safety 0 cannot be preempted because the necessary checks are ommited. This can be overcome by calling
yield
at regular intervals. Usually there is no need to call this if you use functions from the
common-lisp
package because these are not compiled at safety 0, but for example if you find that preemption is not working in a loop with no function calls,
yield
can be useful. Note that
process-allow-scheduling
also allows preemption, but also checks the wait functions of other processes.