[project @ 1998-06-05 11:16:08 by simonm]
authorsimonm <unknown>
Fri, 5 Jun 1998 11:16:09 +0000 (11:16 +0000)
committersimonm <unknown>
Fri, 5 Jun 1998 11:16:09 +0000 (11:16 +0000)
- thread creation test

ghc/tests/concurrent/should_run/conc004.hs [new file with mode: 0644]
ghc/tests/concurrent/should_run/conc004.stdout [new file with mode: 0644]

diff --git a/ghc/tests/concurrent/should_run/conc004.hs b/ghc/tests/concurrent/should_run/conc004.hs
new file mode 100644 (file)
index 0000000..6a1ee0f
--- /dev/null
@@ -0,0 +1,13 @@
+module Main where
+
+-- Test thread creation.
+-- (from: Einar Wolfgang Karlsen <ewk@Informatik.Uni-Bremen.DE>)
+
+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 (file)
index 0000000..be54b4b
--- /dev/null
@@ -0,0 +1 @@
+"done"