Stackless 3.0 alpha 1 at blinding speed

Courageous jkraska at san.rr.com
Tue Apr 22 00:13:19 EDT 2003


>Except that a collection of threads isn't as powerful as continuations.  As
>soon as "the program counter" changes in one of those threads, the
>continuation it's standing in for has been changed.  A true continuation can
>be invoked any number of times, starting at exactly the same state each
>time.  You'd have to augment those threads with some platform-specific
>grunge to clone the thread control state top-to-bottom to repair that
>weakness.

Actually, you're right. The metaphor sort of broke down, didn't it? What
you can do with park threads is indeed just a subset of what continuations
can do. I suppose this is troubled by the fact that I've *demonstrated*
that particularly whacky feature of continuations to friends to impress,
but never actually made use of it in a production system. Continuations
allow you to do whacky upside down things like make a function return,
say, TWICE. :)

>That's the rub.  Continuations are simple from a very abstract view, in
>function spaces.  Implementing them efficiently on real hardware with finite
>resources is a challenge.

Eh, YEAH. It's even more of a challenge to create a maintainable
implementation. :)

C//





More information about the Python-list mailing list