From a1b89b43ef79209eab6459c0c21c7568759ebb16 Mon Sep 17 00:00:00 2001 From: simonm Date: Fri, 5 Jun 1998 11:16:09 +0000 Subject: [PATCH] [project @ 1998-06-05 11:16:08 by simonm] - thread creation test --- ghc/tests/concurrent/should_run/conc004.hs | 13 +++++++++++++ ghc/tests/concurrent/should_run/conc004.stdout | 1 + 2 files changed, 14 insertions(+) create mode 100644 ghc/tests/concurrent/should_run/conc004.hs create mode 100644 ghc/tests/concurrent/should_run/conc004.stdout 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" -- 1.7.10.4