[Stackless] Continuations in stackless

Grant Olson olsongt at verizon.net
Sun May 21 00:19:22 CEST 2006


> 
> One consequence is that the very same running function
> invocation can be running many times in parallel, operating
> on the same variables. Also, it is possible to return from the
> same function call as many times you like, at any time
> in the future.
> 
> If you think this is trivial, then you missed the point.
> It is easy to miss it. The power of full continuations
> is frightening!
> 
> This is what the first version of Stackless Python supported.
> And the reason why I abandoned it was that nobody really
> understood it, including myself. :-)
> 

Glad to see I'm not the only one. ;-)

I'm still digesting this, but I see a "full continuation" as sort of a
"fork-factory".  Instead of just forking a process (or tasklet in this case)
and starting to run it, it creates a factory function that saves a copy of a
process or tasklet.  This factory function can return and run the forked
version of the tasklet over and over.  Hopefully this is somewhat close to
the real definition.

I was hoping I could simulate this with some simple code, but it looks like
you can't pickle the current tasklet. [Which is understandable.] Now I'm
toying with a separate tasklet that does this.

> If you think I should write a few words for wikipedia, I'm happy
> to do so, but I'm evenly fine if you are writing a good text.
> 

At this point I don't think I'm qualified to write anything. ;-)

-Grant


_______________________________________________
Stackless mailing list
Stackless at stackless.com
http://www.stackless.com/mailman/listinfo/stackless



More information about the Stackless mailing list