I'm seeing some odd behavior when using dynamic-wind within a thread.
If an error occurs during the thunk, the 'after' portion is never
called nor are any subsequent statements. thread-join! then throws
an exception.

Can anyone shed light on this?  It is causing problems with the sqlite3 egg.

(define (foo)
  (print "start")
  (dynamic-wind
      noop
      (lambda () (error "during body"))
      (lambda () (print "during cleanup")))
  (print "end"))

;;; Without thread

#;1> (foo)
start
Error: during body
during cleanup
end

;;; With thread -- after, end lost

#;2> (thread-start! foo)
start
Warning (#<thread: thread8>): : during body
#;3> (thread-join! #2)
Error: uncaught exception: #<condition: (exn)>


_______________________________________________
Chicken-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to