[Haskell-cafe] FFI woes!
Benjamin.Rudiak-Gould at cl.cam.ac.uk
Thu Dec 16 03:46:58 EST 2004
Sebastian Sylvan wrote:
>If there was a way to simply defer GC (like you attatch a function to
>an object which can simply deny the GC the right to remove it
>depending on its state) then I wouldn't have to do anything
>significant in the finalizer.
Why not spawn a thread which starts the playback, waits for it to
finish, and then exits, and wrap the whole thread in a call to
withForeignPtr? Then your finalizer won't be called prematurely.
More information about the Haskell-Cafe