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 <rep...@bugs.python.org>
<http://bugs.python.org/issue20505>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to