> So what's wrong with [...]

That would have the garbage collector invoking a C function (this is
ok) which then calls a Haskell function (this is not and the ffi spec
says not to expect it to work).  

Mutation cannot be overlapped with garbage collection.

Things would be especially bad if the Haskell finalizer were to
trigger garbage collection since then you have GC overlapped with GC -
the GC is definitely not reentrant.

--
Alastair


_______________________________________________
FFI mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/ffi

Reply via email to