summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2018-06-07 22:25:52 (GMT)
committerGitHub <noreply@github.com>2018-06-07 22:25:52 (GMT)
commit79790bc35fe722a49977b52647f9b5fe1deda2b7 (patch)
treeb1b3da290ccfb7055c94e937cd1edc0282bf7a38 /Misc
parentd3ed67d14ed401dfe2b5d07b6941adc3ecacb268 (diff)
downloadcpython-79790bc35fe722a49977b52647f9b5fe1deda2b7.zip
cpython-79790bc35fe722a49977b52647f9b5fe1deda2b7.tar.gz
cpython-79790bc35fe722a49977b52647f9b5fe1deda2b7.tar.bz2
bpo-33694: Fix race condition in asyncio proactor (GH-7498)
The cancellation of an overlapped WSARecv() has a race condition which causes data loss because of the current implementation of proactor in asyncio. No longer cancel overlapped WSARecv() in _ProactorReadPipeTransport to work around the race condition. Remove the optimized recv_into() implementation to get simple implementation of pause_reading() using the single _pending_data attribute. Move _feed_data_to_bufferred_proto() to protocols.py. Remove set_protocol() method which became useless.
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS.d/next/Library/2018-06-07-23-51-00.bpo-33694.F1zIR1.rst2
1 files changed, 2 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2018-06-07-23-51-00.bpo-33694.F1zIR1.rst b/Misc/NEWS.d/next/Library/2018-06-07-23-51-00.bpo-33694.F1zIR1.rst
new file mode 100644
index 0000000..6b7f15c
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2018-06-07-23-51-00.bpo-33694.F1zIR1.rst
@@ -0,0 +1,2 @@
+asyncio: Fix a race condition causing data loss on
+pause_reading()/resume_reading() when using the ProactorEventLoop.