
14 Sep
2008
14 Sep
'08
7:10 p.m.
Andrea Rossato wrote:
On Sun, Sep 14, 2008 at 02:24:23PM -0300, Marco TĂșlio Gontijo e Silva wrote:
and the result of ls only after I press a key. Does getChar blocks the other threads?
yes, but you can use forkOS from Control.Concurrent and compile with -threaded.
See the relevant documentation for the details.
forkOS not relevant here. -threaded is necessary to allow haskell code to run whilst FFI calls are blocked. getChar doesn't count as an FFI call (the RTS does its own IO multiplexing) but system does. forkOS is to do with bound threads, that's something else. Jules