From 57f63882ea1fc9056e6208b8a9e007b3bf33dac7 Mon Sep 17 00:00:00 2001 From: simonmar Date: Thu, 8 Mar 2001 13:41:31 +0000 Subject: [PATCH] [project @ 2001-03-08 13:41:31 by simonmar] update for blocking putMVar --- ghc/tests/concurrent/should_run/conc018.hs | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/ghc/tests/concurrent/should_run/conc018.hs b/ghc/tests/concurrent/should_run/conc018.hs index 6ffe887..34894e1 100644 --- a/ghc/tests/concurrent/should_run/conc018.hs +++ b/ghc/tests/concurrent/should_run/conc018.hs @@ -1,10 +1,16 @@ import Concurrent import Exception +-- test that putMVar blocks on a full MVar rather than raising an +-- exception. + main = do - Exception.catch (do - m <- newMVar () - putMVar m () - ) - (\e -> print e) - + t <- forkIO ( + Exception.catch (do + m <- newMVar () + putMVar m () + ) + (\e -> print e) + ) + threadDelay 500000 + killThread t -- 1.7.10.4