summaryrefslogtreecommitdiff
path: root/Python/compile.c
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2018-05-20 03:57:32 -0700
committerGitHub <noreply@github.com>2018-05-20 03:57:32 -0700
commit28ea38b97b2bfbde9f387a8b90b02d05b93c895c (patch)
tree5a3fab0a016a43f18742c8e052e1eda7743b1bfe /Python/compile.c
parentf0af69faee902d4b80c07c100dbd528fd8df6832 (diff)
downloadcpython-git-28ea38b97b2bfbde9f387a8b90b02d05b93c895c.tar.gz
bpo-26819: Prevent proactor double read on resume (GH-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. (cherry picked from commit 4151061855b571bf8a7579daa7875b8e243057b9) Co-authored-by: CtrlZvi <viz+github@flippedperspective.com>
Diffstat (limited to 'Python/compile.c')
0 files changed, 0 insertions, 0 deletions