stackless python

Christian Tismer tismer at tismer.com
Mon Dec 31 09:58:27 EST 2001


Donn Cave wrote:

> Quoth "John DeWeese" <deweese at usc.edu>:
> | Hello, I'm a python newbie interested in using stackless python to support
> | hundreds of simulation objects for a game. I've checked out various articles
> | and it sounds great, and I've visited stackless.com. Seems that branch is
> | becoming a bit dated. I also see that some features such as generators (not
> | relevant to me) have made it into python 2.2. So, what's up, can anyone
> | share their experiences regarding stackless python, micro-threads, etc.?
> 
> Stackless can really do miracles for an application design that has to
> deal with asynchronous event handling of some kind.  I don't think you
> ever get miracles like that free, though.  To work with Stackless, you
> really need to keep your head screwed on - in my opinion it isn't for
> casual use in every conceivable application.  Raw continuations, anyway -
> I don't know microthreads, that sword is probably not so double-edged.
> Anyway, it's like a whole new language, and one with not much competition -
> I don't know, can Scheme do that stuff?


I'm pretty sure Scheme can. It has raw continuations, so you can
implement everything with them, why not microthreads?
Continuations can do even more, they are able to create new
control structures for your language. And exactly that it the point
which makes them insuitable for Python: They are too powerful.
Python has its own control structures, and we don't need a construct
with the power to build some. This is oversized, and very oversized
construct turns out to be a drawback at some future.
What Python needs is a secure mechanism to switch frame changes
at certain times. This is not continuations, but microthreads with
explicit or implicit switching.

I will implement this for Python 2.2, probably with some help
of volunteers.

ciao - chris

-- 
Christian Tismer             :^)   <mailto:tismer at tismer.com>
Mission Impossible 5oftware  :     Have a break! Take a ride on Python's
Kaunstr. 26                  :    *Starship* http://starship.python.net/
14163 Berlin                 :     PGP key -> http://wwwkeys.pgp.net/
PGP Fingerprint       E182 71C7 1A9D 66E9 9D15  D3CC D4D7 93E2 1FAE F6DF
      where do you want to jump today?   http://www.stackless.com/






More information about the Python-list mailing list