LispWorks User Guide and Reference Manual > 32 The HCL Package

NextPrevUpTopContentsIndex

unwind-protect-blocking-interrupts-in-cleanups

Macro
Summary

Does unwind-protect blocking interrupts around the cleanups.

Package

hcl

Signature

unwind-protect-blocking-interrupts-in-cleanups protected-form &rest cleanups => results

Arguments

protected-form

A form.

cleanups

Forms.

Values

results

The values of protected-form .

Description

The macro unwind-protect-blocking-interrupts-in-cleanups executes protected-form . On exit, whether local or not, the cleanups are executed with interrupts blocked.

In compiled code, the macro is equvalent to

(unwind-protect
    protected-form
  (mp:with-interrupts-blocked cleanup1
 cleanup2
 ..)

However, in interpreted code the macro is expanded to ensure that the body of mp:with-interrupts-blocked actually happens. If the form above is interpreted the evaluator may throw (if the process is killed, for example) before completing macroexpansion of mp:with-interrupts-blocked and doing the actual blocking.

Notes
  1. cleanups can block and unblock interrupts using current-process-block-interrupts and current-process-unblock-interrupts. This may be useful if some of the cleanups are essential and others are not.
  2. Blocking interrupts causes the process to not respond to interrupts, including killing. You should make sure that forms which are executed with interrupts blocked do not hang.
See also

current-process-block-interrupts
current-process-unblock-interrupts
unwind-protect-blocking-interrupts
with-interrupts-blocked


LispWorks User Guide and Reference Manual - 22 Dec 2009

NextPrevUpTopContentsIndex