[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Continuation safety




I'm interested in writing Scheme code, but when it creates threads,
opens files, and so on, what are the normal steps toward guaranteeing
that they're freed?  I'm afraid that my code is in general lacking
such robustness.

I hear mention of custodians but don't really understand how to use
them.  The PLT Scheme Language Manual dedicates less than 1/3 of a
page to custodians, and I'm wondering where I could find introductary
documentation for this concept, especially some kind of example of how
and when to put them use, how to rely on them to solve a job, etc.  If
I have to call (custodian-shutdown-all ...) in order to invoke a
custodian, what prevents a continuation from bypassing that call too?

Is a custodian the right way to make code continuation-safe?  What
other techniques are used?

Thanks very much in advance.

-- 
Chris