[issue20311] epoll.poll(timeout) and PollSelector.select(timeout) must round the timeout to the upper bound

Charles-François Natali report at bugs.python.org
Sat Jan 25 17:04:04 CET 2014


Charles-François Natali added the comment:

> If the patch is accepted, my changes on Python 3.3 should also be
reverted.

I'm sorry, but I'm not convinced.
The selector's granularity is an implementation detail, and I don't think
it should be exposed.
Furthermore, it's not a mere function of the C type used to represent the
timeout to the underlying syscall (long, timeval): it also depends on the
operating system, the hardware, etc.

Once again, what's wrong with your initial approach of ceiling the timeout?
It does seem reasonable to round away from zero, to ensure - not taking OS
bugs/limitations - that select() will wait at least the passed timeout.

----------

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


More information about the Python-bugs-list mailing list