Simon Peyton-Jones
Tue, 20 Mar 2001 09:45:50 -0800

| I see your point, and I must admit that this approach has its=20
| 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=20
| 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!