bpo-35380: Enable TCP_NODELAY for proactor event loop#10867
Conversation
1st1
left a comment
There was a problem hiding this comment.
I'm a bit cautious (i.e. I'm +0) with backporting this to 3.7. Are you sure it's 100% safe?
| futures._get_loop(fut).stop() | ||
|
|
||
|
|
||
| if hasattr(socket, 'TCP_NODELAY'): |
There was a problem hiding this comment.
I'd add a new asyncio.sockutils module for this kind of stuff.
There was a problem hiding this comment.
sockutils.py sounds great but in the case I doubt if the PR can be backported.
There was a problem hiding this comment.
Indeed, I suggest to do that in a follow up PR specifically for the master branch.
There was a problem hiding this comment.
Created https://bugs.python.org/issue35392 for it.
|
Yes, the change is safe: Windows supports TCP_NODELAY very well for any version, at least I used it on Win 2000 and XP. Without backport third parties like aiohttp should check for event loop type and enable the mode for proactor only, which looks very odd. |
SGTM |
|
Thanks @asvetlov for the PR 🌮🎉.. I'm working now to backport this PR to: 3.6, 3.7. |
|
@asvetlov: Please replace |
|
GH-10872 is a backport of this pull request to the 3.7 branch. |
(cherry picked from commit 3bc0eba) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
|
Sorry, @asvetlov, I could not cleanly backport this to |
|
GH-10874 is a backport of this pull request to the 3.6 branch. |
Restore a consitensy with selector based event loops.
TCP_NODELAY is enabled starting from Python 3.6
https://bugs.python.org/issue35380