[project @ 2003-09-25 14:44:36 by sof]
[ghc-base.git] / Control / Concurrent.hs
index c0352df..c5fbaa2 100644 (file)
@@ -317,7 +317,7 @@ Support for multiple operating system threads and bound threads as described
 below is currently only available in the GHC runtime system when the runtime system
 has been compiled using a special option.
 
-When recompiling GHC, use ./configure --enable-threaded-rts to enable this.
+When recompiling GHC, use .\/configure --enable-threaded-rts to enable this.
 To find your GHC has already been compiled that way, use
 'rtsSupportsBoundThreads' from GHCi.
 
@@ -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__ */