[plt-scheme] Custodians manage user defined data types
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.
Matthew