From: Bas van Dijk Date: Thu, 14 Oct 2010 21:23:25 +0000 (+0000) Subject: There's no need to explicitly check for blocked status in runInUnboundThread when... X-Git-Tag: ghc-darcs-git-switchover~81 X-Git-Url: http://git.megacz.com/?p=ghc-base.git;a=commitdiff_plain;h=015f7b630e7c970b0cf311d06d9472e4dfa417b6 There's no need to explicitly check for blocked status in runInUnboundThread when we have mask --- diff --git a/Control/Concurrent.hs b/Control/Concurrent.hs index f509bc0..bd05cdc 100644 --- a/Control/Concurrent.hs +++ b/Control/Concurrent.hs @@ -430,10 +430,8 @@ runInUnboundThread action = do if bound then do mv <- newEmptyMVar - b <- blocked _ <- mask $ \restore -> forkIO $ - Exception.try (if b then action else restore action) >>= - putMVar mv + Exception.try (restore action) >>= putMVar mv takeMVar mv >>= unsafeResult else action