[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 21:45:09 UTC 2018

>     forever $ do
>         yield
>         atomically $ writeTVar x True
> ..it always prints -- so the culprit is definitely a failure to yield.


So my implicit assumption was
that a run of the transaction manager (because "atomically")
is also a yield - but this example shows that it isn't.

If this is indeed the case, then this deserves to be mentioned
in the documentation of Control.Concurrent.STM ?

- J.W.

More information about the Haskell-Cafe mailing list