[plt-scheme] register-finalizer wills only executed first time program is Run in DrScheme session

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Tue May 26 16:31:00 EDT 2009

The bug is now fixed in SVN.

Originally, the library created a will-executing thread on start-up, so
it worked ok as part of DrScheme that is shared with user programs. At
some point, I changed it to create the thread on demand --- which used
the wrong custodian if that demand was from a user program within
DrScheme. I changed the FII to use the root custodian for the
will-executing thread, no matter when the thread is created.

At Tue, 26 May 2009 06:06:36 -0400, Neil Van Dyke wrote:
> Thanks.  I have some fancy generalized code in a different library (fast 
> CGI) that could be adapted for this purpose.
> However, for this library (you guessed it: database), I would prefer to 
> use wills from "register-finalizer".
> I wonder whether there is something I am doing wrong, or a single bug 
> that, once fixed, will make my wills execute reliably.
> Noel Welsh wrote at 05/26/2009 05:53 AM:
> > I suggest using different mechanisms to ensure your database
> > connections are never left open. I have never had much success with
> > wills.
> >   
> _________________________________________________
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme

Posted on the users mailing list.