A Thread for Every Thread?

At 2002-06-18 08:17, Dean Herington wrote:
Would it be feasible to support an alternative strategy for mapping Haskell threads onto OS threads, namely that the two sets are kept in one-to-one correspondence?
I was wondering the same thing... At 2002-06-18 08:27, Simon Peyton-Jones wrote:
The current GHC model has the basic assumption that OS threads are inter-changeable. One Haskell thread may be executed by one OS thread or by many; you just can't tell.
There is a good reason for this: the current OS thread may block in some I/O call (getChar, say), and we don't want that to block all Haskell threads.
Surely with a one-to-one correspondence, this wouldn't be an issue? The one (OS/Haskell) thread would correctly block, and the others wouldn't. -- Ashley Yakeley, Seattle WA
participants (1)
-
Ashley Yakeley