
30 Nov
2018
30 Nov
'18
1:33 p.m.
Quoting Johannes Waldmann (2018-11-30 05:50:03)
Given that, it now feels strange that the following *does* work:
main = do forkIO $ do threadDelay 1000000 ; putStrLn "foo" forever $ putStr ""
I am seeing the "foo" output. I expect the last line to be non-allocating. But it does still yield? Why?
putStr has to acquire a lock on stdout, so that's probably enough to allow the scheduler to run.