This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients pitrou, vstinner
Date 2017-06-29.20:44:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> Not sure why? If you pass 0 instead of a tiny value, select() shouldn't behave significantly differently.

I used select() as an example of function where we also changed how the timeout was rounded, so we had to decide how to handle backward compatibility.

Rounding select() timeout has an big impact of power consumption in an event loop, especially when you use poll() which only has a resolution of 1 ms (and not 1 us). If you round 0.1 ms to 0, you enter a busy-loop which burns your CPU during 0.1 ms. If you do that many times, it can be much longer than 0.1 ms and so be very inefficient.

We had this performance issue in asyncio. We fixed it in asyncio *and* select modules.
Date User Action Args
2017-06-29 20:44:03vstinnersetrecipients: + vstinner, pitrou
2017-06-29 20:44:03vstinnersetmessageid: <>
2017-06-29 20:44:03vstinnerlinkissue30807 messages
2017-06-29 20:44:03vstinnercreate