From 015f7b630e7c970b0cf311d06d9472e4dfa417b6 Mon Sep 17 00:00:00 2001 From: Bas van Dijk Date: Thu, 14 Oct 2010 21:23:25 +0000 Subject: [PATCH] There's no need to explicitly check for blocked status in runInUnboundThread when we have mask --- Control/Concurrent.hs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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 -- 1.7.10.4