projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f0b635a
)
[project @ 2001-03-08 13:41:31 by simonmar]
author
simonmar
<unknown>
Thu, 8 Mar 2001 13:41:31 +0000
(13:41 +0000)
committer
simonmar
<unknown>
Thu, 8 Mar 2001 13:41:31 +0000
(13:41 +0000)
update for blocking putMVar
ghc/tests/concurrent/should_run/conc018.hs
patch
|
blob
|
history
diff --git
a/ghc/tests/concurrent/should_run/conc018.hs
b/ghc/tests/concurrent/should_run/conc018.hs
index
6ffe887
..
34894e1
100644
(file)
--- 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