[MLton-devel] finalization

Henry Cejtin henry@sourcelight.com
Fri, 9 May 2003 17:53:42 -0500


I  think  that  it  does.  Well, if the runtime system included the result of
applying Finalize it would.  An example of the kind of thing I am thinking of
is  that you talk about blocking signals during finalization.  This might not
be wanted.  More importantly, if I have some code which needs to be sure that
no  finalizers  run during it, I don't have a way to delay them.  I.e., given
any finalization mechanism, in some other code I might want to  do  something
like

    withoutFinalizers
       (fn () =>
           (...))

which  runs  the  thunk, but if a GC happens while it is running, the afterGC
thing doesn't run until after the thunk finishes.   It  then  runs,  and  the
result of this expression is the result of the the thunk.

I  am  not  familiar  enough  with  the  Tread stuff in MLton, but despite my
worries, this is definitely nice.  My argument is just that one needs to have
a  global  agreement  on  how  to  delay  the afterGC thing, what context the
finalizers are run in (signals blocked, etc.), and I don't see an obvious set
of such things to pick.


-------------------------------------------------------
Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara
The only event dedicated to issues related to Linux enterprise solutions
www.enterpriselinuxforum.com

_______________________________________________
MLton-devel mailing list
MLton-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlton-devel