Re: Why doesn't GHC force a GC before program quits?

2012-04-18 Thread Simon Marlow
On 18/04/2012 00:15, Paul Liu wrote: Hi Simon, Thanks for the explanation. So is this why there is a separation of mkWeak# and mkWeakForeignEnv#, the latter being used for C finalizers that is guaranteed to run before program quits? Correct. I wonder if it's possible to put some constraint

Re: Why doesn't GHC force a GC before program quits?

2012-04-17 Thread Paul Liu
Hi Simon, Thanks for the explanation. So is this why there is a separation of mkWeak# and mkWeakForeignEnv#, the latter being used for C finalizers that is guaranteed to run before program quits? I wonder if it's possible to put some constraint to the type of finalizers in mkWeak# so as to

Re: Why doesn't GHC force a GC before program quits?

2012-04-10 Thread Simon Marlow
On 03/04/2012 21:40, Paul Liu wrote: It seems to violate the claim that all finalizers are run exactly once mentioned in the weak pointer paper. Is there any reason not to enforce this? GHC does do a GC before the program quits, but it doesn't wait for all the finalizers to finish. It turns

Why doesn't GHC force a GC before program quits?

2012-04-03 Thread Paul Liu
It seems to violate the claim that all finalizers are run exactly once mentioned in the weak pointer paper. Is there any reason not to enforce this? -- Regards, Paul Liu ___ Cvs-ghc mailing list Cvs-ghc@haskell.org