[Haskell-cafe] semantics of concurrent program depends on -O level, -f[no-]omit-yields

Johannes Waldmann johannes.waldmann at htwk-leipzig.de
Thu Nov 29 19:49:03 UTC 2018


> so thread scheduling would be more obvious with individual
> characters being output instead of a single flush triggered by the final
> putChar.

Yes but in my example program, there is no contention for stdout,
as only one thread is using it.

I am inclined to enter this into the GHC issue tracker
as it seems there's no obvious explanation,
and "lost TVars confusing the STM machinery" was mentioned.
Do you mean that this a known thing? Searching the tracker
for "lost TVar" does not turn up anything.

- J.W.


More information about the Haskell-Cafe mailing list