ghci and ghc -threaded broken with pipes & forking

John Goerzen jgoerzen at
Mon Mar 5 09:36:29 EST 2007

On Mon, Mar 05, 2007 at 12:59:17PM +0000, Simon Marlow wrote:
> There seems to be a common misconception that forkOS is necessary to get 
> certain kinds of concurrency, and forkIO won't do.  I don't know where this 
> comes from: the documentation does seem to be quite clear to me.  The only 
> reason to use forkOS is for interacting with foreign code that uses 
> thread-local state; everytyhing else can be done with forkIO (and it is 
> usually better to use forkIO).

>From reading the docs, it sounds like forkIO keeps everything in a
single OS thread/process.  Doesn't this mean that a program that uses
forkIO instead of forkOS loses out on SMP machines?

More information about the Glasgow-haskell-users mailing list