From: wolfgang Date: Mon, 22 Sep 2003 13:27:19 +0000 (+0000) Subject: [project @ 2003-09-22 13:27:19 by wolfgang] X-Git-Tag: nhc98-1-18-release~503 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=d42705d82607427de32a603361fc9420c0fd40f9;p=haskell-directory.git [project @ 2003-09-22 13:27:19 by wolfgang] Really make the bound threads stuff compile this time (sorry). --- diff --git a/Control/Concurrent.hs b/Control/Concurrent.hs index c0352df..3978db0 100644 --- a/Control/Concurrent.hs +++ b/Control/Concurrent.hs @@ -445,15 +445,15 @@ doesn't need it's main thread to be bound and makes /heavy/ use of concurrency runInUnboundThread :: IO a -> IO a runInUnboundThread action = do - bound <- isCurrentThreadBound - if bound - then do - mv <- newEmptyMVar - forkIO (Exception.try action >>= putMVar mv) - takeMVar mv >>= \either -> case either of - Left exception -> Exception.throw exception - Right result -> return result - else action + bound <- isCurrentThreadBound + if bound + then do + mv <- newEmptyMVar + forkIO (Exception.try action >>= putMVar mv) + takeMVar mv >>= \either -> case either of + Left exception -> Exception.throw exception + Right result -> return result + else action #endif /* __GLASGOW_HASKELL__ */