[plt-scheme] dynamic-wind & kill-thread

From: YC (yinso.chen at gmail.com)
Date: Tue Apr 21 04:58:20 EDT 2009

Hi -

what happens when a thread is killed in the middle of executing a
dynamic-wind block?  Does the post-thunk get executed still?

I am tracing my hanging thread
on Matthew's recommendatioin, and the trace lead me to a dynamic-wind
block that first wait on a semaphore and release it in post-thunk.  If the
thread can be killed without executing post-thunk then the next thread would
wait indefinitely (which appears to be what I am experiencing).

If I am on the right track - how can one write kill-safe semaphore code?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20090421/d752b144/attachment.html>

Posted on the users mailing list.