From: simonm Date: Fri, 5 Jun 1998 11:16:09 +0000 (+0000) Subject: [project @ 1998-06-05 11:16:08 by simonm] X-Git-Tag: Approx_2487_patches~631 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=a1b89b43ef79209eab6459c0c21c7568759ebb16;p=ghc-hetmet.git [project @ 1998-06-05 11:16:08 by simonm] - thread creation test --- diff --git a/ghc/tests/concurrent/should_run/conc004.hs b/ghc/tests/concurrent/should_run/conc004.hs new file mode 100644 index 0000000..6a1ee0f --- /dev/null +++ b/ghc/tests/concurrent/should_run/conc004.hs @@ -0,0 +1,13 @@ +module Main where + +-- Test thread creation. +-- (from: Einar Wolfgang Karlsen ) + +import Concurrent + +main :: IO () +main = spawner forkIO 1000000 + +spawner :: (IO () -> IO ()) -> Int -> IO () +spawner c 0 = print "done" +spawner c n = do { c (spawner c (n-1)); return ()} diff --git a/ghc/tests/concurrent/should_run/conc004.stdout b/ghc/tests/concurrent/should_run/conc004.stdout new file mode 100644 index 0000000..be54b4b --- /dev/null +++ b/ghc/tests/concurrent/should_run/conc004.stdout @@ -0,0 +1 @@ +"done"