Re: Finalizers: conclusion?

2003-01-13 Thread Manuel M T Chakravarty
Antony Courtney [EMAIL PROTECTED] wrote, You indicated that you were somewhat unclear why we need liveness dependencies. I'll attempt to clarify by sketching some of the details of the particular C library for which I am writing FFI wrappers. I have a C library for 2D vector graphics.

Re: Finalizers: conclusion?

2002-10-22 Thread Marcin 'Qrczak' Kowalczyk
22 Oct 2002 01:32:55 +0100, Alastair Reid [EMAIL PROTECTED] pisze: -- keepAlive x y ensures that the finalizer for y is not run -- until after the finalizer for x has run to completion. What if I do keepAlive p1 p2 keepAlive p2 p1? They will never be collected? -- __( Marcin

Re: Finalizers: conclusion?

2002-10-22 Thread Alastair Reid
[EMAIL PROTECTED] pisze: keepAlive x y ensures that the finalizer for y is not run until after the finalizer for x has run to completion. Marcin: What if I do keepAlive p1 p2 keepAlive p2 p1? They will never be collected? Correct. I'm a bit vague about what liveness dependencies are

Re: Finalizers: conclusion?

2002-10-22 Thread Alastair Reid
John Meacham [EMAIL PROTECTED] 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

Re: Finalizers: conclusion?

2002-10-22 Thread Antony Courtney
Hi Alastair, Thanks for the concise summary of the problem raised by shared thunks, and for the keepAlive proposal. [btw will you be in New Haven around 16-19 Nov? I'm going to swing through there on my next trip over and it'd be good to see you and maybe ever humiliate myself again in the

Re: Finalizers: conclusion?

2002-10-21 Thread Malcolm Wallace
Simon Marlow [EMAIL PROTECTED] writes: Ok, I'm sad to say that the problem we recently uncovered to do with finalizers sharing values with the rest of the program essentially kills off the possibility of doing Haskell finalizers in systems without proper concurrency support. Well, I'm not

Finalizers: conclusion?

2002-10-21 Thread Simon Marlow
Ok, I'm sad to say that the problem we recently uncovered to do with finalizers sharing values with the rest of the program essentially kills off the possibility of doing Haskell finalizers in systems without proper concurrency support. I'm rather embarassed that I didn't notice this before;

Re: Finalizers: conclusion?

2002-10-21 Thread Antony Courtney
Hi, I have only been watching this Haskell finalizers discussion from a great distance, but I am keenly interested in the outcome, as it will require a significant overhaul of some of my own FFI-based library code. (My code currently uses touchForeignPtr in a Haskell finalizer to express a

Re: Finalizers: conclusion?

2002-10-21 Thread John Meacham
I also need the touchForeignPtr trick in much of my code. we need to come up with a replacement if we dont have haskell finalizers. here are my canidate suggestions: * add a subset of Weak pointers (or some subset of their functionality) to the FFI spec. just get rid of the finalizer capability