summaryrefslogtreecommitdiff
path: root/testsuite/tests/concurrent/should_run/conc017.hs
diff options
context:
space:
mode:
authorThomas Miedema <thomasmiedema@gmail.com>2016-06-18 22:44:19 +0200
committerThomas Miedema <thomasmiedema@gmail.com>2016-06-20 16:22:07 +0200
commit5b03dc69389dc387b922c589ab9a8b92079e6a96 (patch)
tree807db4d3e26cc078cab86def2df40afcd59803db /testsuite/tests/concurrent/should_run/conc017.hs
parent915e07c33b143126e3c8de1d2ec22ccc709a9a24 (diff)
downloadhaskell-5b03dc69389dc387b922c589ab9a8b92079e6a96.tar.gz
Testsuite: tabs -> spaces [skip ci]
Diffstat (limited to 'testsuite/tests/concurrent/should_run/conc017.hs')
-rw-r--r--testsuite/tests/concurrent/should_run/conc017.hs38
1 files changed, 19 insertions, 19 deletions
diff --git a/testsuite/tests/concurrent/should_run/conc017.hs b/testsuite/tests/concurrent/should_run/conc017.hs
index c1ca4e745a..69c171732e 100644
--- a/testsuite/tests/concurrent/should_run/conc017.hs
+++ b/testsuite/tests/concurrent/should_run/conc017.hs
@@ -9,31 +9,31 @@ main = do
m1 <- newEmptyMVar
m2 <- newEmptyMVar
m3 <- newEmptyMVar
- forkIO (do
- takeMVar m1
- throwTo main_thread (ErrorCall "foo")
- takeMVar m2
- throwTo main_thread (ErrorCall "bar")
- putMVar m3 ()
- )
- (do
+ forkIO (do
+ takeMVar m1
+ throwTo main_thread (ErrorCall "foo")
+ takeMVar m2
+ throwTo main_thread (ErrorCall "bar")
+ putMVar m3 ()
+ )
+ (do
mask $ \restore -> do
- (do putMVar m1 ()
+ (do putMVar m1 ()
restore (
- -- unblocked, "foo" delivered to "caught1"
- myDelay 100000
- )
- ) `Control.Exception.catch`
+ -- unblocked, "foo" delivered to "caught1"
+ myDelay 100000
+ )
+ ) `Control.Exception.catch`
\e -> putStrLn ("caught1: " ++ show (e::SomeException))
- putMVar m2 ()
- -- blocked here, "bar" can't be delivered
- (sum [1..10000] `seq` return ())
- `Control.Exception.catch`
+ putMVar m2 ()
+ -- blocked here, "bar" can't be delivered
+ (sum [1..10000] `seq` return ())
+ `Control.Exception.catch`
\e -> putStrLn ("caught2: " ++ show (e::SomeException))
-- unblocked here, "bar" delivered to "caught3"
takeMVar m3
- )
- `Control.Exception.catch`
+ )
+ `Control.Exception.catch`
\e -> putStrLn ("caught3: " ++ show (e::SomeException))
-- compensate for the fact that threadDelay is non-interruptible