(define (trick) (dynamic-wind (lambda () (print "before")) (lambda () (error 'foo)) (lambda () (print "after")))) ;; calls before and after, no surprises: (trick) ;; calls before only - why? (thread-start! (lambda () (trick))) ;; calls before and after, no surprises (thread-start! (lambda () (handle-exceptions e (raise e) (trick))))