[Stackless] Re: [Python-Dev] Stackless Design Q.

Christian Tismer tismer at tismer.com
Wed Feb 20 13:44:31 CET 2002


Greg Ewing wrote:

>>Now I am at the point where I'm worst suited for:
>>Design an interface.
>>
> 
>>Please tell me what you think, and what you'd like
>>to change.
>>
> 
> It's not clear exactly what you're after here. Are you
> trying to define the lowest-level interface upon which
> everything else will be built? If so, I think what you
> have presented is FAR too complex.


The old Stackless with its continuations was at lowest
possible level, in a sense.
What I now try to do is a compromise: I would like to
build the simplest possible but powerful set of
methods. At the same time, I'd like to keep track
of tasklets, since they are now containing vitual
information about stack state, and I cannot afford
to loose one of them, or we'll crash.
The little doubly-linked list maintenance is very
cheap to do. So my basic idea was to provide
what is needed to get uthreads at very high speed,
without the ned to use Python for the basic
machinery.

> It seems to me you need only two things:


<snip/>

Yes, I need these two things, and some more.

> All the other stuff you talk about -- passing values between
> tasklets, rings of runnable tasklets, scheduling policies, etc --
> can all be implemented in Python on top of these primitives.


Sure it can, with one exception:
My tasklets will also support threading, that is they
will become auto-scheduled if the user switches this
on. But auto-scheduled frames are a diffeent kind
of thing than those which are in "waiting for data"
state. I need to distinguish them or I will crash.
That's the reason why I keep these linked lists.
Switching to the wrong tasklet should be rock solid
in the kernel, this is nothing that I want people
to play with from Python.

Thanks a lot anyway, I'll try to make it even simpler.

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/


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



More information about the Stackless mailing list