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.

-- Jerome

Reply via email to