[Haskell-cafe]Re: Hugsvs GHC (again)was: Re: Somerandomnewbiequestions

Simon Marlow simonmar at microsoft.com
Thu Jan 20 04:32:07 EST 2005

On 19 January 2005 20:31, Glynn Clements wrote:

> Keean Schupke wrote:
>>>> Okay, my ignorance of Posix is showing again. Is it currently the
>>>> case, then, that every GHC thread will stop running while a disk
>>>> read is in progress in any thread? Is this true on all platforms?
>>> It's true on Unix-like systems, I believe.  Even with -threaded.  It
>>> might not be true on Win32.
>> I think this is not true on linux, where a thread is just a process
>> created with special flags to keep the same fds and memory.
>> As threads on linux are scheduled like processes, one thread
>> blocking should not affect the others?
> That should be true of all POSIX-like thread implementations
> (including Linux, whose threads aren't quite POSIX-compliant, e.g. in
> regard to signal handling, but aren't that far off).
> Essentially, blocking system calls only block the calling kernel
> thread.
> OTOH, if you are implementing multiple user-space threads within a
> single kernel thread, if that kernel thread blocks, all of the
> user-space threads within it will be blocked.

We're getting a bit confused here.  Keean: the original question was
about whether a disk read will stop all other *Haskell* threads.  Not OS
threads.  The two are quite different beasts in GHC.


More information about the Haskell-Cafe mailing list