[issue20452] test_timeout_rounding() of test_asyncio fails on "x86 Ubuntu Shared 3.x" buildbot
Charles-François Natali
report at bugs.python.org
Fri Jan 31 11:36:31 CET 2014
Charles-François Natali added the comment:
> It looks like select() and poll() in Linux < 2.6.28 has a resolution
> of 1/HZ, where HZ can be retrieved from os.sysconf('SC_CLK_TCK'). Since
> Linux 2.6.28, hrtimers are now used for timeouts.
> Attached patch improves the resolution field of selectors.BaseSelector.
> By the way, resolution should be a method (selector.resolution())
> rather than a property, because we may query the kernel to compute the
> resolution, as shown in the patch.
That's exactly why I said that an explicit resolution is a bad idea:
- it's an implementation detail
- it's fragile (just look at your latest patch)
- it's useless
Just round the timeout away from 0 and be happy: this will fix the busy-wait problem, and that's all we want.
Once again, I know I keep repeating myself, but having select/epoll/whatever wake up 10usec before the timeout isn't an issue: *all* async-IO frameworks out there work just fine with this.
So please, revert all this granuarity complexity, and re-apply the timeout rounding.
----------
nosy: +neologix
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20452>
_______________________________________
More information about the Python-bugs-list
mailing list