At 11:00 AM +0200 6/9/02, Jerome Vouillon wrote:
>On Sat, Jun 08, 2002 at 02:39:33PM -0400, Dan Sugalski wrote:
>>  >Instead of using some space on the stack, co-routines can store all
>>  >their local variables into their closure.  Then, there is no need to
>>  >swap in any context.
>>
>>  You still need to store the stack frames created since the start of
>>  the coroutine when picking up after the yield. Otherwise we're
>>  declaring that coroutines can't use any stack at the point a yield is
>>  called, which is a rather big thing to declare.
>
>Python-style co-routines have this very restriction.  If we want real
>co-routines, we can build them on top of callcc, which will take care
>of storing the stack frames.

I'm not sure I want to go all the way to using continuations for 
coroutines. Seems a bit of overkill, especially on the return from 
the coroutine. Python-style restrictions are right out, of course--if 
we're going to do it, we might as well do it right as we don't have 
an existing implementation we're restricted by.
-- 
                                         Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                       teddy bears get drunk

Reply via email to