Finalizers and FFI
Alastair Reid
alastair at reid-consulting-uk.ltd.uk
Thu Jun 10 11:35:10 EDT 2004
> BUT: This can make some people unhappy. Isn't there a more deterministic
> way to schedule finalizers?
I wrote the Hugs version which does try to be more deterministic so I'm
probably not the best qualified to write about what's wrong with GHC :-)
But, I think part of the problem is that GHC gives the 'main' thread special
status: the whole program quits when the main thread quits even if there are
other threads that are runnable. There'd be less of a problem if the whole
program quit only when there were no runnable threads _and_ garbage
collection did not create any runnable threads.
I think there's a reason why GHC gives the main thread special status though.
They certainly went to some effort to give it special status so I guess there
must be a good reason that they did so?
--
Alastair Reid
More information about the Glasgow-haskell-users
mailing list