|
Re: forkIO and not -threaded: msg#00105lang.haskell.glasgow.bugs
On Sat, 2006-07-29 at 01:29 +0100, Neil Mitchell wrote: > Hi, > > main = do > forkIO $ print "yes" > print "done" > > Compiled without -threaded, on 6.2.2 gives > > "yes" > "done" > > on 6.4.2 > > "done" > > Seems the semantics of forkIO in this case has changed completely? Actually what changed is whether all threads have to finish or just the main thread. So what happens now with your code is that the main thread terminates the whole program before the other thread gets a chance to run. If you want to wait for a thread to terminate you can do that explicitly. Duncan
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | forkIO and not -threaded, Neil Mitchell |
|---|---|
| Next by Date: | Re: [GHC] #710: library reorganisation, GHC |
| Previous by Thread: | forkIO and not -threaded, Neil Mitchell |
| Next by Thread: | Re: [GHC] #710: library reorganisation, GHC |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |