From: simonmar Date: Thu, 8 Mar 2001 13:41:31 +0000 (+0000) Subject: [project @ 2001-03-08 13:41:31 by simonmar] X-Git-Tag: Approximately_9120_patches~2447 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=57f63882ea1fc9056e6208b8a9e007b3bf33dac7;p=ghc-hetmet.git [project @ 2001-03-08 13:41:31 by simonmar] update for blocking putMVar --- 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