[Stackless] micro-threads & co-routines

Gordon McMillan gmcm at hypernet.com
Fri Oct 13 14:30:18 CEST 2000


Just wrote:

> At 11:36 AM +0200 12-10-2000, Dirk-Ulrich Heise wrote:

[snip]
> >A completely different question: All these concepts by
> >Christian seem to be very complex. Did somebody
> >consider modeling them using Python, that is, create a sort of
> >prototype engine that would allow testing them before the C
> >coding starts? Just asking for curiosity.
> 
> There needs to be _some_ C-level support for restartable frames
> (a.k.a. continuations. Well, sortof.) to be able to experiment
> with this. But maybe that support can be extremely minimal at
> first (maybe even so bare that it's possible to crash Python if
> not used properly...). On the other hand, Christian is a speed
> freak, and if his continuations can't be as fast as can be, he
> won't have as much fun with them ;-)
> 
> For a while now I've been trying to convince Christian to make
> continuations much more primitive -- less options, simpler
> semantics -- but I'm not sure how much he is willing to give up.
> Everything that the current continuations can do, should be
> modelable (is that a word?) with even simpler building blocks.

Actually, I don't really think that's true. This isn't like thread.py 
vs. threading.py. In that case the low-level module exposes 
things that exist in the OS, and the higher makes it sane. But 
stackless / continuation isn't exposing "something else" to 
Python, it's manipulating Python's guts so the language itself 
works differently. Doing that with Python would be like tying 
your shoes with boxing gloves on.



- Gordon
_______________________________________________
Stackless mailing list
Stackless at starship.python.net
http://starship.python.net/mailman/listinfo/stackless



More information about the Stackless mailing list