Re: DYNAMIC-WIND before and after procedures are not protected from interruption
Taylor R Campbell <[email protected]> Thu, 24 Dec 2009 10:24:43 -0500
| Newsgroups | gmane.lisp.scheme.scheme48 |
|---|---|
| Message-ID | <[email protected]> |
Date: Thu, 24 Dec 2009 00:50:28 -0800 From: Robert Ransom <[email protected]> You don't need to interrupt that code snippet during the after thunk to keep it from releasing its lock: > ,open debug-messages threads > (define (make-print-thunk . xs) (lambda () (apply debug-message xs))) ; no values returned > (dynamic-wind (make-print-thunk "<in>") (lambda () (sleep 10000)) (make-print-thunk "<out>")) <in> ^C interrupt: keyboard interrupt [command-level-event-handler] keyboard 1> ,pop <out> ; no values returned > I don't understand. Both before and after procedures were executed, as the output demonstrates. How would the lock not be released?