[issue17956] add ScheduledExecutor

Charles-François Natali report at bugs.python.org
Mon May 13 17:24:50 CEST 2013


Charles-François Natali added the comment:

> To be honest I can't find much to say about this proposal,

Hum, OK, I thought it would be a useful addition :-)

> but I think it would be good if the time function were configurable (both for test purposes, and to allow passing e.g. time.monotonic). I suppose this could be an executor option.

Note that the time function must be "real" time, since the sleep are
based on condition.wait() (otherwise if you just call an arbitrary
sleep() function you can't be woken up when a new task with an earlier
deadline is submitted).
So it's different from the sched module, we can't really support
arbitrary time functions.

Note that I do think it would be a good idea to use time.monotonic()
when available (almost all modules have been updated, except the
future one). That's probably another issue, though.

----------

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


More information about the Python-bugs-list mailing list