Update a couple of tests to use mask rather than block/unblock
authorIan Lynagh <ian@well-typed.com>
Tue, 19 Feb 2013 18:47:48 +0000 (18:47 +0000)
committerIan Lynagh <ian@well-typed.com>
Tue, 19 Feb 2013 18:47:48 +0000 (18:47 +0000)
testsuite/tests/concurrent/should_run/T2910.hs
testsuite/tests/concurrent/should_run/T4030.hs

index 2867008..76b8d2f 100644 (file)
@@ -2,7 +2,7 @@ import Control.Exception
 import GHC.Conc
   
 main = do
-    t1 <- block $ forkIO yield
+    t1 <- mask $ \_ -> forkIO yield
     t2 <- forkIO $ killThread t1
     threadDelay 100000
     threadStatus t1 >>= print
index 1993bad..f160dfd 100644 (file)
@@ -1,8 +1,8 @@
 module Main where
 
-import Control.Concurrent ( forkIO, killThread )
-import Control.Exception  ( block )
+import Control.Concurrent
+import Control.Exception
 
 main :: IO ()
-main = do tid <- block $ forkIO $ let x = x in x
+main = do tid <- mask $ \_ -> forkIO $ let x = x in x
           killThread tid