[project @ 2002-04-10 11:43:43 by stolz]
Two new scheduler-API primops:
1) GHC.Conc.forkProcess/forkProcess# :: IO Int
This is a low-level call to fork() to replace Posix.forkProcess().
In a Concurrent Haskell setting, only the thread invoking forkProcess()
is alive in the child process. Other threads will be GC'ed!
This brings the RTS closer to pthreads, where a call to fork()
doesn't clone any pthreads, either.
The result is 0 for the child and the child's pid for the parent.
The primop will barf() when used on mingw32, sorry.
2) GHC.Conc.labelThread/forkProcess# :: String -> IO ()
Useful for scheduler debugging: If the RTS is compiled with DEBUGging
support, this primitive assigns a name to the current thread which
will be used in debugging output (+RTS -D1). For larger applications,
simply numbering threads is not sufficient.
Notice: The Haskell side of this call is always available, but if
you are not compiling with debugging support, the actual primop will
turn into a no-op.