Native Threads in the RTS

Simon Peyton-Jones
Mon, 2 Dec 2002 08:57:34 -0000

| 2. Calling from foreign code into Haskell to a bound foreign import
| require some special handling to ensure that a subsequent call out to
| foreign code will use the same native thread.  Why couldn't this
| handling select the same Haskell thread instead of creating a new one?

This is just an efficiency issue, right?   If creating a Haskell thread
from scratch is very cheap, then it's easier to do that each time rather
than to try to find the carcass of a completed Haskell thread.   If you
do the latter, you need to get into carcass management. =20

But maybe there is more to it than efficiency in your mind?