The macro
unwind-protect-blocking-interrupts
executes
protected-form
with interrupts blocked. On exit, whether local or not, the
cleanups
are executed with interrupts blocked.
In compiled code, the macro is equvalent to
(mp:with-interrupts-blocked
(unwind-protect
protected-form
(mp:current-process-block-interrupts)
cleanup1 cleanup2 ..)))
However, in interpreted code the macro is expanded to ensure that the call to
(mp:current-process-block-interrupts)
actually happens. If the above form is interpreted and
protected-form
uses current-process-unblock-interrupts, the evaluator may throw (if the process is killed, for example) before calling current-process-unblock-interrupts.
current-process-block-interrupts
current-process-unblock-interrupts
unwind-protect-blocking-interrupts-in-cleanups