Simon Marlow [EMAIL PROTECTED] wrote,
As Haskell finalizers need pre-emptive concurrency, maybe
they should go somewhere related to concurrency. Or we
could have a Foreign.Concurrent.
Ok, how about Foreign.Concurrent.newForeignPtr and
Foreign.Concurrent.addForeignPtrFinalizer? i.e.
This is all fine, except that implementing finalizer ordering slows
down ForeignPtrs quite a bit, in particular mallocForeignPtr takes a
20% hit just allocating the IORef needed to store the list of
finalizers. Ideas for a better implementation are welcome.
Having obviously optimized