summaryrefslogtreecommitdiff
path: root/Lib/asyncio/tasks.py
diff options
context:
space:
mode:
authorCtrlZvi <viz+github@flippedperspective.com>2018-05-20 03:21:10 -0700
committerAndrew Svetlov <andrew.svetlov@gmail.com>2018-05-20 13:21:10 +0300
commit4151061855b571bf8a7579daa7875b8e243057b9 (patch)
tree67475c5547ab6d6b4ebc9a9dbbd9fd769aeee0f3 /Lib/asyncio/tasks.py
parentf5e7b1999f46e592d42dfab51563ea5411946fb7 (diff)
downloadcpython-git-4151061855b571bf8a7579daa7875b8e243057b9.tar.gz
bpo-26819: Prevent proactor double read on resume (#6921)
The proactor event loop has a race condition when reading with pausing/resuming. `resume_reading()` unconditionally schedules the read function to read from the current future. If `resume_reading()` was called before the previously scheduled done callback fires, this results in two attempts to get the data from the most recent read and an assertion failure. This commit tracks whether or not `resume_reading` needs to reschedule the callback to restart the loop, preventing a second attempt to read the data.
Diffstat (limited to 'Lib/asyncio/tasks.py')
0 files changed, 0 insertions, 0 deletions