summaryrefslogtreecommitdiffstats
path: root/Python/graminit.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-04-03 11:22:27 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2015-04-03 11:22:27 (GMT)
commit10550cdb8a4412155b1743bbac01fd7cfc7320f7 (patch)
tree5a82e049c91582bff6e2c91451482cc3d0fc7915 /Python/graminit.c
parent13019fdef3b6d589f8d7602943c76fcc637114ea (diff)
downloadcpython-10550cdb8a4412155b1743bbac01fd7cfc7320f7.zip
cpython-10550cdb8a4412155b1743bbac01fd7cfc7320f7.tar.gz
cpython-10550cdb8a4412155b1743bbac01fd7cfc7320f7.tar.bz2
Issue #23834: Simplify timeout handling
* Use the new _PyTime_FromSeconds() function to set the timeout to -1 second for socket.settimeout(None). It avoids a special case in internal_select() because of a rounding issue: -1 nanosecond is rounded to 0 millisecond which means non-blocking, instead of blocking. * Check if the interval the negative in sock_call_ex() instead of doing the check in internal_select(). sock_call_ex() remembers if the socket has a timeout or not, which avoids a race condition if the timeout is modified in a different thread.
Diffstat (limited to 'Python/graminit.c')
0 files changed, 0 insertions, 0 deletions