[Stackless] stackless.run() returns tuple????

Christian Tismer tismer at stackless.com
Mon Jul 16 21:46:52 CEST 2007


On 16.07.2007, at 08:54, Paul Sijben wrote:

> Christian,
>
> under which conditions is run supposed to exit?

Run first removes main from the runnables.
Then it is supposed to run until there are no more tasklets
runnable, that is they are gone, or blocked or whatever.
Run stops when the runnables circular list is empty.
It then re-inserts irself (main) and continues.
It should return None.

In the case where an integer parameter is given, it runs
for the number of VM instructions. If there are still
runnables after the # of ticks (instructions), the current
tasklet is intercepted and returned as the result of run().
The idea is to either catch tasklets that went astray,
or, for small tick counts, to implement pre-emptive
scheduling (careful with that, not trivial).

I don't quite remember what happens with exceptions.
Wel, I thing uncaught exceptions would stop run()
as well and let the exception propagate into main,
where you anyway suld put you default exception handler,
around run().

ciao - chris

--
Christian Tismer             :^)   <mailto:tismer at stackless.com>
tismerysoft GmbH             :     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 802 86 56  mobile +49 173 24 18 776  fax +49 30 80 90 57 05
PGP 0x57F3BF04       9064 F4E1 D754 C2FF 1619  305B C09C 5A3B 57F3 BF04
       whom do you want to sponsor today?   http://www.stackless.com/





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.stackless.com/pipermail/stackless/attachments/20070716/da90d9dc/attachment.htm>
-------------- next part --------------
_______________________________________________
Stackless mailing list
Stackless at stackless.com
http://www.stackless.com/mailman/listinfo/stackless


More information about the Stackless mailing list