
20 Mar
2001
20 Mar
'01
12:45 p.m.
| I see your point, and I must admit that this approach has its | charm. It's | not what I had in mind, though. Simon's MVars (in the Awkward Squad) | come pretty close, but they're still not the sort of (cooperative) | multitasking that I'm thinking of. I'm not looking for a | process or thread | model of concurrency. That's too expensive for simulations due to the | frequency of task switches. Could you try it and see? GHC's threads are implemented in GHC's runtime system; thread switching is much much much cheaper than switching between OS threads. It's designed to support thousands or hundreds of thousands of threads. Give it a whirl! Simon