Finalizers: conclusion?
Alastair Reid
alastair at reid-consulting-uk.ltd.uk
Tue Oct 22 06:16:34 EDT 2002
John Meacham <john at repetae.net> writes:
> here are my canidate suggestions:
> * add a subset of Weak pointers
Can you spell this out in detail. What are the functions? What are
their semantics?
> - or -
> * add addForeignDependency :: ForeignPtr a -> ForeignPtr b -> IO ()
Again, could you spell out the semantics.
> note that breaking these dependencies might be tricky/impossible
This is something I don't understand.
Why do you have to break dependencies? Is it to break dependency
cycles?
Also, when do you break dependencies? e.g., Do C finalizers need a
way to tell Haskell to break a dependency? Do you manually detect
that some objects have not been collected and speculatively start
breaking dependencies? If the problem is cycles, would it be helpful
if addForeignDependency detected when it created a cycle and raise an
exception/ set a flag/ etc.
--
Alastair
More information about the FFI
mailing list