Next: , Previous: , Up: iklib unwind-protect   [Index]


6.9.3 On the meaning of dynamic extent termination

The concept of dynamic extent termination is defined by Vicare’s unwind–protection mechanism and it is not a R6RS concept. In this discussion, we consider the syntax use:

(with-unwind-protection ?unwind-handler ?thunk)

the procedure ?unwind-handler is called when the dynamic extent of the invocation of ?thunk terminates; dynamic extent termination is different from dynamic extent exiting as determined by dynamic-wind (see dynamic-wind). When the execution flow exits the dynamic extent of a function call: such extent might also terminate, but not all the exits are also terminations.

The dynamic extent of a call to ?thunk is terminated, and so ?unwind-handler is invoked, when:

The dynamic extent of a call to ?thunk is not terminated, and so ?unwind-handler is not invoked, when:

About the termination of the dynamic extent of ?thunk, we must acknowledge that:

If ?unwind-handler raises an exception: such exception is blocked and discarded.


Next: , Previous: , Up: iklib unwind-protect   [Index]