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 vstinner
Date 2013-11-28.21:10:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1385673009.77.0.328160102824.issue19827@psf.upfronthosting.co.za>
In-reply-to
Content
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 Peter Portante some months ago:
https://mail.python.org/pipermail/python-dev/2013-January/123661.html

See also the rejected issue #19813: "Add a new optional timeout parameter to socket.socket() constructor".
History
Date User Action Args
2013-11-28 21:10:09vstinnersetrecipients: + vstinner
2013-11-28 21:10:09vstinnersetmessageid: <1385673009.77.0.328160102824.issue19827@psf.upfronthosting.co.za>
2013-11-28 21:10:09vstinnerlinkissue19827 messages
2013-11-28 21:10:09vstinnercreate