Proposed change to ForeignPtr

George Russell ger at tzi.de
Tue Sep 10 13:39:00 EDT 2002


George Russell wrote:
[snip]
> Is it really so difficult to create some queue of delayed functions which can be appended
> to from C and which nhc checks every time it does "leave GHC"?
[snip]
Sorry, that was rather impolite of me.  Now I've looked back through the archives I see that
Malcolm has tried this and found it difficult for good reason.  All the same I don't
see how it can be avoided.  In Foogle-land they can't know anything about when Haskell is
running a garbage collection or not, and of course Foogle might be running various concurrent
threads (just like Haskell), so if you are going to say that Foogle is never to call a
Haskell function during a Haskell garbage collection, I don't see how Foogle is to call Haskell
at all.



More information about the FFI mailing list