
9 Feb
2009
9 Feb
'09
4:35 p.m.
Hi Haskell Cafe, I wrote very short program to sleep for 5 seconds compiled with the -threaded option in ghc on the Mac OS X 1.5. I am finding that using the sleep function doesn't sleep at all, whereas using threadDelay does: main = do putStrLn "Waiting for 5 seconds." threadDelay 5000000 -- works putStrLn "Done." main = do putStrLn "Waiting for 5 seconds." sleep 5 -- doesn't sleep at all putStrLn "Done." Anybody know what's happening? Thanks -John