On 16/02/2012 22:20, Michael Craig wrote:
I haven't checked, but ...
I checked, and your solution works. In the context of a larger program,
getting NOLINE pragmas in all the right places would be challenging,
wouldn't it?
I found a bug report on the GHC Trac [1] in which Simon explains the
When I read the docs for System.Mem.Weak, it all seems to make sense. But
then this code doesn't run as I expect it to when I turn on -threaded:
http://hpaste.org/63832 (Expected/actual output are listed in the paste.)
I've tried this on 7.4.1 and 7.0.4 with the same results. Can someone
On Thu, Feb 16, 2012 at 2:04 PM, Michael Craig mks...@gmail.com wrote:
When I read the docs for System.Mem.Weak, it all seems to make sense. But
then this code doesn't run as I expect it to when I turn on
-threaded: http://hpaste.org/63832 (Expected/actual output are listed in the
paste.)
Quoting Antoine Latter aslat...@gmail.com:
On Thu, Feb 16, 2012 at 2:04 PM, Michael Craig mks...@gmail.com wrote:
When I read the docs for System.Mem.Weak, it all seems to make sense. But
then this code doesn't run as I expect it to when I turn on
-threaded: http://hpaste.org/63832
This seems to be an explanation of why a finalizer might run later than
expected (or not run at all). But his paste shows that it runs *earlier*
than what he expected.
What he said.
64-bit GHC on OS X gives me this:
...
However, it's a different story when `-O2` is specified:
...
You're
On Thu, Feb 16, 2012 at 02:55:13PM -0600, Austin Seipp wrote:
64-bit GHC on OS X gives me this:
$ ghc -fforce-recomp -threaded finalizer
[1 of 1] Compiling Main ( finalizer.hs, finalizer.o )
Linking finalizer ...
$ ./finalizer
waiting ...
done!
waiting ...
running finalizer
I haven't checked, but ...
I checked, and your solution works. In the context of a larger program,
getting NOLINE pragmas in all the right places would be challenging,
wouldn't it?
I found a bug report on the GHC Trac [1] in which Simon explains the
importance of evaluating the thunk before