Carl Friedrich Bolz-Tereick pushed to branch branch/py3.7 at PyPy / pypy

Commits:
7dc1056e by Carl Friedrich Bolz-Tereick at 2020-04-09T22:14:04+02:00
fix bpo-31976: a race condition between BufferedWriter.close and .write, if the
flush called by .close is taking a long time: write needs to check whether the
file is closed *while* it is holding the lock. Otherwise the file can still be
open at the beginning of the write method, but by the time the lock is acquired
a bit later the file can have been closed in the meantime. Unfortunately I
didn't manage to write an applevel test for this problem, but
test_slow_close_from_thread() in the stdlib's test_io.py shows the problem.

--HG--
branch : py3.7

- - - - -


1 changed file:

- pypy/module/_io/interp_bufferedio.py


View it on GitLab: 
https://foss.heptapod.net/pypy/pypy/commit/7dc1056eb8bb765cd82a5fd05e0957aa7310d1ae

---
View it on GitLab: 
https://foss.heptapod.net/pypy/pypy/commit/7dc1056eb8bb765cd82a5fd05e0957aa7310d1ae
You're receiving this email because of your account on foss.heptapod.net.
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to