[Stackless] Vacation and SLP 3.0

Christian Tismer tismer at tismer.com
Sat Apr 26 23:28:21 CEST 2003


Dear friends,

I will be on a one-week vacation in the south of Germany
and probably hardly reachable. But I will do my favorite
vacation fun: Work on Stackless, not reading emails.

There are of course some issues to solve, like where
"run" and "run_watchdog" should go in the future.
I'm implementing opti(on|m)al pre-emptive scheduling
now, and there is the question whether this should
be an extra function, or a keyword parameter to run(),
or a method of the scheduler object going to evolve.

If anybody has some comments, I will most probably
read emails tomorrow around 11:am local time (GMT+1),
then I will at best only rarely reachable next week.

During the vacation, I will do quite a lot of work,
most probably resulting in Stackless 3.0, first final.
This will be the "Rothenburg Edition".

Here a copy of a discussion about these topics with
Eric van Riet Paap; please give me some input.

cheers -- chris

"""
Thank you for having a vote at this. I'm not sure if I am the right
person to answer your questions, since I haven't used stackless very
often and I might still have the wrong idea about what each
functions/methods/class will do. On the other side this is an
advantage because I I look at it the way I think it should work
instead of how I know it should work.

On Saturday 26 April 2003 15:07, you wrote:

 >> Eric van Riet Paap wrote:
 >>> > I would get rid of the run_watchdog(timeout) since run(...) is
 >>> > what it does and the watchdog is some specialisation of that.
 >>
 >> You are right.
 >> It has been otherwise before, since the watchdog was written
 >> for CCPgames, who needed this. Later on, I realized that
 >> this is just run, whether there is a watchdog or not.
 >> On the other hand, I will implement preemptive scheduling
 >> now. I'm undecided whether this should be just done by
 >> a third parameter to run (the time slice), or if it is better
 >> to have an extra function run_scheduled?

how about parameter name (for instance 'preemptive' default 0)
0 = not preemptive (current situation)
and also have a constant called DEFAULT_PREEMTIVE_TIMESLICE=1000.
Thereby making it explicit (Python way) instead of 'hidden' on you C code.

What Python libraries do you use sometimes? What are similar
situations in their usage? What method do you prefer?

 >> The latter would have the benefit that I could give a decent
 >> default to the time slice (maybe 1000).
 >> My customers almost don't want auto-scheduling, so I need
 >> to do it right.
 >> It also might not be necesary to have this parameter,
 >> instead it could become a priority parameter for tasklet
 >> creation, and prio 0, or setting the atomic flag by default,
 >> would prevend auto-scheduling, too.

So you maybe want to have each tasklet have a time slice (priority),
that sounds very nice (like thread priotiry in windows threads).
However having to supply an extra value for each task creation
doesn't sound very nice, escpecially when I 'just' want preemptive,
but don't really care about the timeslice per tasklet. (i.e want
all tasklets to have the same timeslice)

 >> Third, there is a concept of some scheduler object, which
 >> needs to be developed. Essentially, run() is a method of that
 >> scheduler object. Should I eventually put such properties
 >> into that object and deprecate the timeout parameter for run(),
 >> or use keyword parameters?

Again, I am no stackless expert (yet  ), you are the only one.
If I think of keyword parameters I think about tcl and I really
don't like tcl. I do like qt (not much experience here either  ),
but that appears to be designed a lot nicer/simpler. With qt
(from trolltech) you do things like (pseudecode):

button = QT.CreateButton('some name')
button.SetName('another name')
button.SetBackgroundColor( QT.RED )

so you can set some/many things at creation, but can also
simply change them later throught methods.

 >> Hmm, hmm. I'm good at implementation, but not at design

More people should use stackless and give feedback!
"""

In that sense, *please do*

(sent to stackless and bcc to some friends)
-- 
Christian Tismer             :^)   <mailto:tismer at tismer.com>
Mission Impossible 5oftware  :     Have a break! Take a ride on Python's
Johannes-Niemeyer-Weg 9a     :    *Starship* http://starship.python.net/
14109 Berlin                 :     PGP key -> http://wwwkeys.pgp.net/
work +49 30 89 09 53 34  home +49 30 802 86 56  pager +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 www.tismer.com
http://www.tismer.com/mailman/listinfo/stackless




More information about the Stackless mailing list