[project @ 2004-11-22 10:26:46 by simonmar]
[ghc-base.git] / Control / Concurrent.hs
index e820d17..3b7f784 100644 (file)
@@ -506,9 +506,9 @@ runInUnboundThread action = do
 >    forkChild :: IO () -> IO ()
 >    forkChild io = do
 >       mvar <- newEmptyMVar
->       forkIO (io `finally` putMVar mvar ())
 >       childs <- takeMVar children
 >       putMVar children (mvar:childs)
+>       forkIO (io `finally` putMVar mvar ())
 >
 >     main =
 >      later waitForChildren $