From: Steve Gunnell <[EMAIL PROTECTED]> Date: Mon, 09 Jan 2006 18:45:24 +0800
On Sun, 2006-01-08 at 11:05 -0500, Bob Rogers wrote: > From: Steve Gunnell <[EMAIL PROTECTED]> > Date: Sun, 08 Jan 2006 15:02:37 +0800 > > . . . > > It also seems to me that with coroutines and threads you might have > diverging contexts with different active exceptions and actions. > > I am assuming the ithreads model, where there is no sharing of contexts > between threads. I believe that is how threads are currently > implemented in Parrot . . . Well I haven't looked at the code but I was thinking along the lines that Threads and Coroutines inherit their current context from somewhere ... So which bits can they safely inherit and which bits must be masked? The dynamic context is defined solely by the control stack, which is intimately tied to the call chain. Ithreads means that there is no sharing of context between threads, because each thread starts with an empty control stack. Coroutines would share whatever context they inherited in common by virtue of being started from the same sub call in the running program. But each coroutine (or non-coroutine) would not need to know about the others, if there are any, so there's no need for "masking." Also how does all this interact with the lightweight context that Perl Blocks need? You've lost me. We were talking about dynamic context here, as opposed to anything that might pertain solely to a block (which would therefore make it lexical). -- Bob