From: simonmar Date: Wed, 26 Feb 2003 10:22:14 +0000 (+0000) Subject: [project @ 2003-02-26 10:22:14 by simonmar] X-Git-Tag: nhc98-1-18-release~727 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=d33bd45975c7a9dd54ae04ea1bcf890fb428b863;p=ghc-base.git [project @ 2003-02-26 10:22:14 by simonmar] Add a note about the problem with forkProcess, for the time being. --- diff --git a/GHC/Conc.lhs b/GHC/Conc.lhs index cb57319..cf15836 100644 --- a/GHC/Conc.lhs +++ b/GHC/Conc.lhs @@ -161,6 +161,9 @@ that only the desired thread is running after the fork(). The stopped threads are /not/ garbage collected! This behaviour may change in future releases. + +NOTE: currently, main threads are not stopped in the child process. +To work around this problem, call 'forkProcessPrim' from the main thread. -} forkProcessPrim :: IO Int @@ -169,6 +172,9 @@ forkProcessPrim = IO $ \s -> case (forkProcess# s) of (# s1, id #) -> (# s1, (I# {- | 'forkProcess' is a wrapper around 'forkProcessPrim' similar to the one found in "Posix.forkProcess" which returns a Maybe-type. The child receives @Nothing@, the parent @Just (pid::Int)@. In case of an error, an exception is thrown. + +NOTE: currently, main threads are not stopped in the child process. +To work around this problem, call 'forkProcess' from the main thread. -} forkProcess :: IO (Maybe Int)