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.
On Sun, Sep 14, 2008 at 10:24 AM, Marco Túlio Gontijo e Silva
[EMAIL PROTECTED] wrote:
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?
I think this behavior is caused by (or at least related to) the
following GHC bug:
Em Dom, 2008-09-14 às 11:08 -0700, Judah Jacobson escreveu:
On Sun, Sep 14, 2008 at 10:24 AM, Marco Túlio Gontijo e Silva
[EMAIL PROTECTED] wrote:
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?
I think
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
Em Dom, 2008-09-14 às 16:07 -0300, Marco Túlio Gontijo e Silva escreveu:
Thanks, I got it to work running
threadWaitRead stdInput
before getChar.
Now I've got another problem:
import Control.Concurrent
import System.IO
import System.Process
main :: IO ()
main
= do
process -
marcot:
Em Dom, 2008-09-14 às 16:07 -0300, Marco Túlio Gontijo e Silva escreveu:
Thanks, I got it to work running
threadWaitRead stdInput
before getChar.
Now I've got another problem:
import Control.Concurrent
import System.IO
import System.Process
main :: IO ()
main
Em Dom, 2008-09-14 às 14:52 -0700, Don Stewart escreveu:
marcot:
Em Dom, 2008-09-14 às 16:07 -0300, Marco Túlio Gontijo e Silva escreveu:
Thanks, I got it to work running
threadWaitRead stdInput
before getChar.
Now I've got another problem:
import Control.Concurrent