From 931d30f2e1bee7e4624cb6ebce923ea194e53090 Mon Sep 17 00:00:00 2001 From: simonmar Date: Tue, 15 Aug 2000 14:12:18 +0000 Subject: [PATCH] [project @ 2000-08-15 14:12:18 by simonmar] this test had random end conditions; make it a bit more deterministic --- ghc/tests/concurrent/should_run/conc005.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- 1.7.10.4