
14 Sep
2008
14 Sep
'08
5:24 p.m.
Hello.
import System.Cmd import GHC.Conc
main :: IO () main = forkIO ( do putStrLn "fork" system "ls" return ()) >> getChar >> return ()
When I run this code, I get fork and the result of ls only after I press a key. Does getChar blocks the other threads? Greetings. -- marcot Página: http://marcotmarcot.iaaeee.org/ Blog: http://marcotmarcot.blogspot.com/ Correio: marcot@riseup.net XMPP: marcot@jabber.org IRC: marcot@irc.freenode.net Telefone: 25151920 Celular: 98116720 Endereço: Rua Turfa, 639/701 Prado 30410-370 Belo Horizonte/MG Brasil