[issue20311] epoll.poll(timeout) and PollSelector.select(timeout) must round the timeout to the upper bound
STINNER Victor
report at bugs.python.org
Thu Jan 23 22:39:53 CET 2014
STINNER Victor added the comment:
> Those failures are "expected", nothing guarantees that the syscall
> will take at least the amount of time specified.
Ah? The manual page of epoll_wait() says:
"The timeout argument specifies the minimum number of milliseconds that epoll_wait() will block. (This interval will be rounded up to the system clock granularity, and kernel scheduling delays mean that the blocking interval may overrun by a small amount.)"
I read minimum, not maximum here :-)
If epoll_wait(timeout_ms) may wait less than timeout_ms seconds, asyncio algorithm is wrong, or at least inefficient. It should loop until the time delta is at least total_timeout seconds. See the original issue:
http://code.google.com/p/tulip/issues/detail?id=106
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20311>
_______________________________________
More information about the Python-bugs-list
mailing list