> On Fri 22 Sep, [EMAIL PROTECTED] wrote:
> > Why does this code fragment print a continous stream of b's?
> > I thought it should print some alternation of a's and b's.
> 
> Sorry, I don't know the answer, but this post reminds me of something
> I'd been meaning to ask..
> 
> I seem to remember reading that Concurrent Haskell only needs 1 stack,
> rather than 1 stack per thread. Is this true? (If so I can't see how
> this can be done using preemptive thread switching.)

GHC's implementation of concurrency uses one stack per thread.  You can,
however, implement the Concurrent Haskell primitives non-preemptively, using
only a single stack.  This is I believe what is implemented in Hugs.

Cheers,
        Simon

Reply via email to