chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] srfi-18 and dynamic wind problem


From: Jim Ursetto
Subject: [Chicken-users] srfi-18 and dynamic wind problem
Date: Sat, 5 Apr 2008 22:41:31 -0600

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)>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]