RE: The Revenge of Finalizers

2002-10-15 Thread Simon Marlow
Indeed, I very nearly implemented such a thing as part of the patch I sent out. However, it didn't look trivial enough to implement so I backed off. The blocked state needs to be saved restored at various points: when starting a finalizer, when invoking a foreign-exported function,

RE: The Revenge of Finalizers

2002-10-15 Thread Simon Marlow
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,

Re: The Revenge of Finalizers

2002-10-15 Thread Alastair Reid
So, are we now claiming that my patch *is* safe? (Never mind about IORefs, I'm talking about the implementation itself). No. And my recent focus on IORefs has simply been because they seemed the strongest argument. A ___ FFI mailing list [EMAIL