Is this a concurrency bug in base?

Daniel Fischer daniel.is.fischer at googlemail.com
Sun Oct 9 14:45:48 CEST 2011


On Sunday 09 October 2011, 13:52:47, Jean-Marie Gaillourdet wrote:
> This seems to be a Heisenbug as it is extremely fragile, when adding a
> "| grep 1" to the while loop it seems to disappears. At least on my
> computers. 

Still produces 1s here with a grep.

> 
> All this was done on several Macs running the latest OS X Lion with ghc
> 7.0.3 from the binary distribution on the GHC download page. 

linux x86_64, ghc-7.0.4, 7.0.2 and 6.12.3.
Indeed 6.12.3 goes so far to sometimes produce
0
0
---
10

---
0
0
---
01

---

i.e. it switches threads during print.



More information about the Glasgow-haskell-users mailing list