From: simonm Date: Mon, 17 Aug 1998 10:59:01 +0000 (+0000) Subject: [project @ 1998-08-17 10:59:01 by simonm] X-Git-Tag: Approx_2487_patches~322 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=3fe02e4c96d027557f3e1a2a2a9d4d47d2899f5b;p=ghc-hetmet.git [project @ 1998-08-17 10:59:01 by simonm] Update tests now that the death of the main thread ends the program. --- diff --git a/ghc/tests/concurrent/should_run/conc001.hs b/ghc/tests/concurrent/should_run/conc001.hs index 8f7f3fe..0468727 100644 --- a/ghc/tests/concurrent/should_run/conc001.hs +++ b/ghc/tests/concurrent/should_run/conc001.hs @@ -7,9 +7,9 @@ import Concurrent main = do s <- newEmptyMVar let - reader = do - str <- takeMVar s - putStr str + write = do + putMVar s "hello world\n" - forkIO reader - putMVar s "hello world\n" + forkIO write + str <- takeMVar s + putStr str diff --git a/ghc/tests/concurrent/should_run/conc002.hs b/ghc/tests/concurrent/should_run/conc002.hs index 4e876f8..7008802 100644 --- a/ghc/tests/concurrent/should_run/conc002.hs +++ b/ghc/tests/concurrent/should_run/conc002.hs @@ -4,12 +4,11 @@ import Concurrent main = do c <- newChan - let - reader = do - char <- readChan c - if (char == '\n') - then return () - else do putChar char; reader - forkIO reader - writeList2Chan c "Hello World\n" + let writer = writeList2Chan c "Hello World\n" + forkIO writer + let reader = do char <- readChan c + if (char == '\n') + then return () + else do putChar char; reader + reader