Guarantees regarding finalizers
Mietek Bąk
mietek at gmail.com
Tue Dec 1 06:25:06 EST 2009
> The docs are rather backward. Foreign.ForeignPtr finalizers are guaranteed
> to run, Foreign.Concurrent finalizers are not. I'll fix the docs, thanks
> for the report.
Thanks for the reply. Unfortunately, I'm running into the following
error message when trying to use a Foreign.ForeignPtr finalizer:
"foo: error: a C finalizer called back into Haskell.
This was previously allowed, but is disallowed in GHC 6.10.2 and later.
To create finalizers that may call back into Haskll, use
Foreign.Concurrent.newForeignPtr instead of Foreign.newForeignPtr."
Is there a technical reason why the Foreign.Concurrent finalizers
aren't guaranteed to run?
Best regards,
--
Mietek Bąk
More information about the Libraries
mailing list