[Stackless] Context Switch

Christian Tismer tismer at tismer.com
Wed Jun 11 03:40:54 CEST 2003

Hi Austine Jane,

> When does current SPython context-switch? Is it only when the explicit
> schedule or channel send/receive is called?

At the moment, it only does a context switch, when either
a channel is resuming a waiting takslet, or if you just
schedule() to the next runnable tasklet.

> Can I make it context-switch
> on time slices like ordinary threads?

You will be able to do this, pretty soon.
I'm just fixing some issues with the new Stacless 3.0
main feature: pickling of tasklets.
When this is done, the stackless.run() method will
grow a timeslice parameter, which controls how often
to switch tasklets, automaticlly.
(No fear: This will only happen to tasklets which have
explictly been registered for explicit scheduling).

ciao -- chris

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

More information about the Stackless mailing list