> > However, to provide a general ordering property on finalizers would
> > be quite awkward in GHC - I just can't think of an easy way to do
> > it.  [Awkward ways deleted]
> 
> If I understand correctly, the problem is that each FP has a cloud of
> finalizer objects attached to it with no particular structure between
> finalizer objects and the reason for this unstructured cloud 
> is because you're piggy-backing on some other mechanism.

Actually in the current implementation the finalizers are not attached
to the ForeignPtr at all:  it's the other way around.  This paper
explains the details:

   http://www.haskell.org/~simonmar/papers/weak.ps.gz

There's currently no way to get from a ForeignPtr to its list of
finalizers (well, you could do a full GC and figure it out).

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

Reply via email to