[issue19827] Optimize socket.settimeout() and socket.setblocking(): avoid syscall

2013-12-03 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5f0d1aad7322 by Victor Stinner in branch 'default': Close #19827: On UNIX, setblocking() and settimeout() methods of socket.socket http://hg.python.org/cpython/rev/5f0d1aad7322 -- nosy: +python-dev resolution: -> fixed stage: -> committed/

[issue19827] Optimize socket.settimeout() and socket.setblocking(): avoid syscall

2013-12-03 Thread Guido van Rossum
Guido van Rossum added the comment: LGTM. I know I've written similar code in Python. :-) -- ___ Python tracker ___ ___ Python-bugs-l

[issue19827] Optimize socket.settimeout() and socket.setblocking(): avoid syscall

2013-12-03 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +gvanrossum, neologix, pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue19827] Optimize socket.settimeout() and socket.setblocking(): avoid syscall

2013-11-28 Thread STINNER Victor
New submission from STINNER Victor: Attached patch avoids a syscall on socket.setblocking() and socket.settimeout() when possible: use ioctl(FIONBIO) when available (not only on VMS), or use fcntl() but only call fcntl() twice if the flags changed. The fcntl() optimization was suggested by Pet