X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=Control%2FConcurrent.hs;h=3978db07843435ac69a62efd258a841438f48ecd;hb=d42705d82607427de32a603361fc9420c0fd40f9;hp=c0352dfc6c9464bcaa2ab5f5cb678760ce59daec;hpb=db180f39b7a709e51edd26a907ee0869ed2628e4;p=haskell-directory.git 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__ */