From: simonmar Date: Tue, 15 Aug 2000 14:12:18 +0000 (+0000) Subject: [project @ 2000-08-15 14:12:18 by simonmar] X-Git-Tag: Approximately_9120_patches~3885 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=931d30f2e1bee7e4624cb6ebce923ea194e53090;p=ghc-hetmet.git [project @ 2000-08-15 14:12:18 by simonmar] this test had random end conditions; make it a bit more deterministic --- diff --git a/ghc/tests/concurrent/should_run/conc005.hs b/ghc/tests/concurrent/should_run/conc005.hs index 5cbcca7..ba7d2ad 100644 --- a/ghc/tests/concurrent/should_run/conc005.hs +++ b/ghc/tests/concurrent/should_run/conc005.hs @@ -6,11 +6,12 @@ import Concurrent main = do v <- newCVar + done <- newEmptyMVar let reader = do c <- readCVar v if (c == '\n') - then return () + then putMVar done () else do putChar c; reader writer [] = do writeCVar v '\n'; return () @@ -18,4 +19,5 @@ main = do forkIO reader writer "Hello World" + takeMVar done