better scheduler with correct sleep times

sokol tvrtko.sokolovski at gmail.com
Sat Oct 18 23:01:26 CEST 2008


> > I started googling for scheduler and found one in standard library
> > but ih has the same code as mine (it calls the  functions in the
> > right order and my doesn't, but it still waits too long).
> > The other schedulers from web are dealing with
> > repeating tasks and such.
>
>
> I believe you're looking for the 'sched' module:http://www.python.org/doc/2.5.2/lib/module-sched.html

The sched module behaves just like mine version because
it uses almost the same code. My observations include the
sched module as well. Check it's source code. It is flawed:
it calls the sleep method and while it sleeps (presumably
for a long time) all newly scheduled events are on hold.
See my example in original post.

My code solves this problem (or so it looks to me right now).



More information about the Python-list mailing list