[Stackless] Fwd: Questions related to stackless

Christian Tismer tismer at stackless.com
Thu Oct 28 16:00:00 CEST 2004

Jiwon Seo wrote:

> Thank you for your detailed explanation. I have more questions, though. ;)
> BTW, the presentation is about stackless python itself (except the
> latest stuff - CSP thing..) not continuation. :)

Then! It should be about the current Stackless, not the
past. :-)
The article is out of date, regarding Stackless,
and the only new documentation available is in the
Stackles Wiki.

There aint no such things like continuations in Stackless!
There aint no such things like continuations in Stackless!
There aint no such things like continuations in Stackless!

This was the lesson I learned when trying to get my
stuff into the Python core. I changed everything,
now I have tasklets and channels. Tasklets are
like one-shot continuations, and the situations
you are referring to simply cannot be constructed
any longer.


> Here, to restore the state of the real frame, I think we might need
> more than two frames since we can have some cases like above. (the one
> I presented in question 1)

Every possible additional entry point to a frame
creates a new continuation frame. I think your
example creates two extra frames, but I didn't have
time to check exactly.

> You mentioned that "The state of local variables is not in the scope
> of continuations, that must be handled explicitly.", but how is it
> handled? (For instance, having multiple frames like I said. :^)

That's the application layer, not continuations.
Continuations are all about locations where
to resume a computation, not local variables.
So this is not my problem. :-)

Yes, if you want to have local variables which
don't interact, why don't you just call the
function twice? That's the normal way to
create two frames. Then you can jump between the
two using continuations, and that's all what most
people want.

But then, I don't need continuations but simple,
switchable contexts. That's what tasklets are
better suited for.

ciao - chris

Christian Tismer             :^)   <mailto:tismer at stackless.com>
tismerysoft GmbH             :     Have a break! Take a ride on Python's
Carmerstr. 2                 :    *Starship* http://starship.python.net/
10623 Berlin                 :     PGP key -> http://wwwkeys.pgp.net/
work +49 30 31 86 04 18  home +49 30 802 86 56  mobile +49 173 24 18 776
PGP 0x57F3BF04       9064 F4E1 D754 C2FF 1619  305B C09C 5A3B 57F3 BF04
      whom do you want to sponsor today?   http://www.stackless.com/

Stackless mailing list
Stackless at stackless.com

More information about the Stackless mailing list