All Manuals > LispWorks® User Guide and Reference Manual > 42 The MP Package

yield Function

Summary

Allows preemption to happen in low safety code.

Package

mp

Signature

yield

Description

Normally code compiled at safety 0 cannot be preempted because the necessary checks are omitted. This can be overcome by calling the function 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.

See also

process-allow-scheduling


LispWorks® User Guide and Reference Manual - 01 Dec 2021 19:30:51