[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
problem<http://www.cs.brown.edu/pipermail/plt-scheme/2009-April/032160.html>based
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?

Thanks,
yc
-------------- 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.