[issue20126] sched doesn't handle events added after scheduler starts

lotus@blossomhillranch.com report at bugs.python.org
Mon Jan 6 00:05:26 CET 2014


lotus at blossomhillranch.com added the comment:

i looks like a different issue. 16165 says you can't add events while the scheduler is running. in my case, i can add them, but they don't run at the correct time.

i'll guess at what the problem is... when you start the scheduler, the thread sleeps until the first scheduled event. when you add an event after the scheduler is running, the scheduler doesn't re-evaluate how long it should sleep. sched.enter(), sched.enterabs(), and sched.cancel() should probably send a signal to the scheduler thread to recalculate the time of the next event.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20126>
_______________________________________


More information about the Python-bugs-list mailing list