Message189147
> > To be honest I can't find much to say about this proposal,
>
> Hum, OK, I thought it would be a useful addition :-)
It's probably useful, but I'd have to take a closer look. It's been
a long time I haven't used separate threads for timers...
> 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).
Agreed, but at least tornado supports a custom time function, even
though their event loop is based on epoll() (under Linux):
http://www.tornadoweb.org/en/stable/ioloop.html#tornado.ioloop.IOLoop.time
This means:
1) the custom time function is used to adjust the epoll() timeout
according to pending timed calls
2) the epoll() call times out based on the system time function
I suppose it works well enough when the divergence is not too large,
and/or the wakeups are frequent enough that there are no glaring defects.
"Practicality beats purity", I guess :) |
|
Date |
User |
Action |
Args |
2013-05-13 15:44:40 | pitrou | set | recipients:
+ pitrou, gvanrossum, bquinlan, r.david.murray, neologix, serhiy.storchaka |
2013-05-13 15:44:39 | pitrou | link | issue17956 messages |
2013-05-13 15:44:39 | pitrou | create | |
|