The Revenge of Finalizers

Simon Marlow simonmar at microsoft.com
Tue Oct 15 08:31:24 EDT 2002


> > Also, this is a nested call to eval(), in a primitive, which can
> > invoke an IO action and therefore re-enter Haskell without going
> > through unsafePerformIO.  Is that safe?
> 
> Yes, I think so.  Most calls to IO actions from primitives are safe
> and I believe these ones are too.  (In some ways, its the rarity of
> race conditions, etc. biting you that disturbs me most about Haskell
> finalizers: it's hard to remember to do the right thing when the wrong
> thing happens so rarely.)

So, are we now claiming that my patch *is* safe?  (Never mind about
IORefs, I'm talking about the implementation itself).

Cheers,
	Simon




More information about the FFI mailing list