[plt-scheme] Cleanup on servlet timeout

From: Jay McCarthy (jay.mccarthy at gmail.com)
Date: Sat Jul 26 08:29:32 EDT 2008

Henk,

The timeout mechanism kills a thread by using custodian-kill-all on
the custodian for that thread. I think, but am not positive, that this
executes the post-thunks of dynamic-winds in the body. Hopefully
knowing how it works will help you debug further. If you think there
is a bug, perhaps you can write a small example that I can test with?

Jay

On Sat, Jul 26, 2008 at 12:04 AM, Henk Boom <lunarc.lists at gmail.com> wrote:
> I'm using the timeout dispatcher to stop responses which take too long
> to compute. Normally when I throw an exception, the sqlite bindings
> ensure that I release the database and I use dynamic-wind to release
> my own locks I have claimed. However, when the request times out this
> cleanup doesn't happen, I'm guessing because the thread is terminated
> in a harsher way. Is there a way I could throw an exception in the
> thread after a timeout instead of simply killing it?
>
> Thanks,
>    Henk
> _________________________________________________
>  For list-related administrative tasks:
>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>



-- 
Jay McCarthy <jay.mccarthy at gmail.com>
http://jay.teammccarthy.org


Posted on the users mailing list.