Seth Kurtzberg wrote:
I have a related question.  The docs state that in some environments O/S 
threads are used when the -threaded flag is used with ghc, and non-O/S threads 
are used otherwise (presumably these are non-preemptive).  Does this apply as 
well to the worker threads that are the subject of this email?

It sounds like the docs are a bit unclear. Which bit of doc in particular are you referring to?

forkIO always creates a lightweight thread. With -threaded, if a thread makes a safe foreign call, then that call might execute concurrently with other threads, because another OS thread (a worker thread) takes over in the runtime. In the HEAD (which will be 6.6), we now allow multiple OS threads in the runtime, so you also get to run multiple Haskell threads simultaneously, which is particularly useful if you have more than one CPU.

Cheers,
        Simon
_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to