diff options
| author | simonmar <unknown> | 2001-03-08 13:41:31 +0000 |
|---|---|---|
| committer | simonmar <unknown> | 2001-03-08 13:41:31 +0000 |
| commit | 57f63882ea1fc9056e6208b8a9e007b3bf33dac7 (patch) | |
| tree | d4c8ca1328b0cebfa1b5ee0b4dfc4d42165a5b88 | |
| parent | f0b635a2a96346186f55778d28d6895c80d9be8a (diff) | |
| download | haskell-57f63882ea1fc9056e6208b8a9e007b3bf33dac7.tar.gz | |
[project @ 2001-03-08 13:41:31 by simonmar]
update for blocking putMVar
| -rw-r--r-- | ghc/tests/concurrent/should_run/conc018.hs | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/ghc/tests/concurrent/should_run/conc018.hs b/ghc/tests/concurrent/should_run/conc018.hs index 6ffe8877f8..34894e117c 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 |
