STINNER Victor added the comment: > Just so it's clear, those bugs are theoretical: whether you pass 1e-7/1e-10 > or 0 to select/kqueue is exactly the same (entering/leaving the syscall takes > some time)...
After many many tests with asyncio (last issue: #20505), I disagree with you. It has a real impact. Can someone please review my new patch? I now think that select.select() should also be fixed in Python 3.4 to be consistent with the new select.poll() and select.epoll.poll() behaviour (timeout rounding). See msg210914 and msg210915 ( http://bugs.python.org/issue20505#msg210914 ): IocpSelector sleeps at least 0.5 ms (of perf counter) even with a timeout of 1 nanosecond, whereas SelectSelector sleeps sometimes 0.030 ms which looks like a non-blocking call. I tested asyncio with the patch to round select timeout away from zero: * With HPET disabled, SelectSelector sleeps at least 15 ms according to the monotonic clock (FYI: at least 2 ms according to the perfomance counter) * With HPET enabled, SelectSelector sleeps at least 15 ms according to the monotonic clock (FYI: at least 6.3 ms according to the perfomance counter) These results are the expected behaviour: selectors should at least one unit of the monotonic time (15.6 ms). ---------- versions: +Python 3.4 -Python 3.5 Added file: http://bugs.python.org/file34034/time_rouding-2.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue20320> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com