[issue20505] Remove resolution from selectors and granularity from asyncio

STINNER Victor report at bugs.python.org
Fri Feb 7 17:54:39 CET 2014


STINNER Victor added the comment:

"Let me state this last point once again: no busy loop can occur now that timeouts are rounded up."

Agreed. The busy loop issue was solved by rounding the timeout away from zero in select and selectors module.

"Sure, some syscalls, on some OS, can sometimes return a little bit earlier than expected, e.g. epoll can return after 0.98ms instead of 1ms. But that's not an issue, if that's the case you'll just loop an extra time, *all* event loops just work this way."

I would like to avoid this *useless* loop, because such case can be common. What's the point of polling again? We just polled all file descriptors.

In msg209772: I saw on "x86 Gentoo 3.x" that "waiting 99.9 ms took 99.6 ms and 99.9 ms, and waiting 9.9 ms took 9.7 ms."

But I remember that I saw larger difference, but I don't remember in which state the code was. So let's get more data from buildbots: I add again the "dt < timeout" message.

----------

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


More information about the Python-bugs-list mailing list