[racket] atexit_closer in an extension

From: Norman Gray (norman at astro.gla.ac.uk)
Date: Tue Jun 29 16:46:57 EDT 2010

Matthew, hello.

On 2010 Jun 29, at 16:38, Matthew Flatt wrote:

> At Tue, 29 Jun 2010 16:23:33 +0100, Norman Gray wrote:
>> It's almost as if I'm stomping on some other atexit closer, 
> Exactly, though that would be difficult to infer from the docs. I'll
> improve them.
> To be clear, you're not completely replacing an existing atexit closer,
> but running earlier than the existing one.

Ach, right -- obvious in retrospect.  It's fixed now.

In case it helps with the adjustment of the docs, I'll mention that, despite reading that section quite carefully, I've consistently had an inaccurate mental model of custodians, including some confusion which you sorted out for me on-list a little while ago [1].

It might be useful to mention, near the beginning of that section, what circumstances one would need to create a new custodian and thus by implication when it's unnecessary (most of the time, I gather).

I had formed the impression that the custodian was all mine (or belonged to my extension/module, or something), which is probably why I cheerfully called closers on everything in sight, within the atexit function.  I can find no text which justifies that misapprehension, but I may not be unique here, so it's something which might be worth heading off explicitly.

Thanks for your help.  Best wishes,


[1] http://lists.racket-lang.org/users/archive/2010-March/038390.html

Norman Gray  :  http://nxg.me.uk

Posted on the users mailing list.