<div dir="ltr">The idea is that putStrLn iterates putChar over the String, then putChar '\n'; so thread scheduling would be more obvious with individual characters being output instead of a single flush triggered by the final putChar.</div><br><div class="gmail_quote"><div dir="ltr">On Thu, Nov 29, 2018 at 2:37 PM Johannes Waldmann <<a href="mailto:johannes.waldmann@htwk-leipzig.de">johannes.waldmann@htwk-leipzig.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">> ... try flushing stdout within the forked thread,<br>
<br>
I did. The behaviour is still as described:<br>
depends on -O0/2, [no]omit-yield,<br>
and small changes in the source.<br>
<br>
While I agree with the general point -<br>
why would I need to hFlush after putStrLn?<br>
hGetBuffering stdoutĀ  tells me it'sĀ  LineBuffering,<br>
and putStrLn does write a line?<br>
<br>
- J.<br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
To (un)subscribe, modify options or view archives go to:<br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
Only members subscribed via the mailman list are allowed to post.</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>brandon s allbery kf8nh</div><div><a href="mailto:allbery.b@gmail.com" target="_blank">allbery.b@gmail.com</a></div></div></div></div></div>