Staging
v0.5.1
https://github.com/python/cpython
Revision 749afe81ec0a4b92ad6b89a67c82f2c04f79c5ac authored by CtrlZvi on 25 May 2018, 08:03:25 UTC, committed by Andrew Svetlov on 25 May 2018, 08:03:25 UTC
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>
1 parent 36f066a
Raw File
Tip revision: 749afe81ec0a4b92ad6b89a67c82f2c04f79c5ac authored by CtrlZvi on 25 May 2018, 08:03:25 UTC
[3.6] bpo-26819: Prevent proactor double read on resume (GH-6921) (#7110)
Tip revision: 749afe8
.bzrignore
.purify
autom4te.cache
config.log
config.cache
config.status
config.status.lineno
db_home
Makefile
buildno
python
build
Makefile.pre
platform
pybuilddir.txt
pyconfig.h
libpython*.a
libpython*.so*
python.exe
python-gdb.py
reflog.txt
tags
TAGS
.gdb_history
Doc/tools/sphinx
Doc/tools/jinja
Doc/tools/jinja2
Doc/tools/pygments
Doc/tools/docutils
Misc/python.pc
Modules/Setup
Modules/Setup.config
Modules/Setup.local
Modules/config.c
Modules/ld_so_aix
Parser/pgen
Lib/test/data/*
Lib/lib2to3/Grammar*.pickle
Lib/lib2to3/PatternGrammar*.pickle
__pycache__
.coverage
coverage/*
htmlcov/*
back to top