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

Bryan Richter b at chreekat.net
Thu Nov 29 19:25:07 UTC 2018

On Thu, Nov 29, 2018, 20:51 Johannes Waldmann <
johannes.waldmann at htwk-leipzig.de wrote:

> On 11/29/18 7:48 PM, Brandon Allbery wrote:
> > main thread exiting will kill the entire process,
> The main thread does "forever $ something".
> The process does not exit (I am not getting
> the console prompt). I observe that the process
> either prints and then hangs, or it hangs immediately.

Printing to the console still isn't a great test to see if something has
"run", because of buffering that seems to behave unintuitively in these
situations. Maybe try flushing stdout within the forked thread, to ensure
the runtime is doing what you think it's doing?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20181129/eade4dbb/attachment.html>

More information about the Haskell-Cafe mailing list