[plt-scheme] Custodians manage user defined data types

From: Chongkai Zhu (czhu at cs.utah.edu)
Date: Wed May 30 18:09:04 EDT 2007

Matthew Flatt wrote:
> At Wed, 30 May 2007 15:25:38 -0500, Chongkai Zhu wrote:
>> Custodians are great, but should it be able to also manage users own 
>> "object"s, say database connections?
> At the C API level, there's scheme_add_managed(), etc. You can get to
> those through the FFI.
> If you're in pure Scheme, there's no way to add arbitrary things to the
> custodian, and it's not clear that it would make sense. That is,
> allowing callbacks to be added to a custodian would give someone a way
> to run code after a shutdown, which defeats the point. But custodian
> boxes (which are set to #f when the owning custodian is shutdown) can
> be created and used in Scheme.

Many thanks. I'm in pure Scheme now, but I will go down to C level for 
this purpose.


Posted on the users mailing list.