classification
Title: 3.4 cherry-pick: 180e4b678003 select and kqueue round the timeout aways from zero
Type: Stage:
Components: Versions: Python 3.4
process
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: larry Nosy List: gregory.p.smith, larry, pitrou, vstinner
Priority: release blocker Keywords:

Created on 2014-02-16 23:34 by vstinner, last changed 2014-03-04 10:22 by vstinner. This issue is now closed.

Messages (4)
msg211374 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2014-02-16 23:34
In Python 3.4, poll and epoll were modified to round the timeout away from zero to fix a performance issue in asyncio. I also modified select and kqueue for the same reason.

changeset:   89230:180e4b678003
tag:         tip
user:        Victor Stinner <victor.stinner@gmail.com>
date:        Mon Feb 17 00:02:43 2014 +0100
files:       Include/pytime.h Lib/test/test_time.py Misc/NEWS Modules/_datetimemodule.c Modules/_testcapimod
description:
Issue #20320: select.select() and select.kqueue.control() now round the timeout
aways from zero, instead of rounding towards zero.

It should make test_asyncio more reliable, especially test_timeout_rounding() test.
msg211446 - (view) Author: Larry Hastings (larry) * (Python committer) Date: 2014-02-17 21:34
This one worries me a little.  Antoine, do you agree that this should be cherry-picked for 3.4.0?
msg212024 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2014-02-23 20:07
I don't see why this cannot wait until 3.4.1.

True, rounding away from zero is desirable in these cases but it seems like this should be a non issue most of the time and any distro (ubuntu) that picks up 3.4.0 can apply this fix to their own python package if they ever find this causing an actual problem.

It was never explained in the original #20320 why anything considers it sane to call a selector with a non-zero microscopic timeout in the first place and expect well defined behavior. IMNSHO desiring any timeout less than a millisecond is asking for trouble from a variety of OS APIs.
msg212700 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2014-03-04 10:22
Let's wait 3.4.1 for this one.
History
Date User Action Args
2014-03-04 10:22:37vstinnersetstatus: open -> closed
resolution: wont fix
messages: + msg212700
2014-02-23 20:07:31gregory.p.smithsetnosy: + gregory.p.smith
messages: + msg212024
2014-02-17 21:34:22larrysetnosy: + pitrou
messages: + msg211446
2014-02-16 23:34:35vstinnercreate