Re: [Haskell-cafe] Waiting for thread to finish

2007-11-28 Thread Matthew Brecknell
Brad Clow: > When I (deeply) force the worker thread's results to be strict, I > observe both cores working, but the execution time (elapsed) slower. I can only speculate, but since you emphasise deep forcing, I wonder how deep is the structure returned from the worker thread? Could it be deep eno

Re: [Haskell-cafe] Waiting for thread to finish

2007-11-27 Thread Don Stewart
briqueabraque: > Hi, > > After I have spawned a thread with > 'forkIO', how can I check if that > thread work has finished already? > Or wait for it? The usual trick I use is to have an MVar that child thread can set when done, causing the main thread to wait: main = do done <- newEmptyMVar

[Haskell-cafe] Waiting for thread to finish

2007-11-27 Thread Maurí­cio
Hi, After I have spawned a thread with 'forkIO', how can I check if that thread work has finished already? Or wait for it? Thanks, Maurício ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe