[Python-checkins] cpython: Issue #20319: concurrent.futures.wait() can block forever even if Futures have
brian.quinlan
python-checkins at python.org
Sat Feb 1 01:51:40 CET 2014
http://hg.python.org/cpython/rev/0bcf23a52d55
changeset: 88869:0bcf23a52d55
user: Brian Quinlan <brian at sweetapp.com>
date: Sat Feb 01 11:49:04 2014 +1100
summary:
Issue #20319: concurrent.futures.wait() can block forever even if Futures have completed
files:
Lib/concurrent/futures/_base.py | 6 ++++--
Misc/NEWS | 6 ++++++
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/Lib/concurrent/futures/_base.py b/Lib/concurrent/futures/_base.py
--- a/Lib/concurrent/futures/_base.py
+++ b/Lib/concurrent/futures/_base.py
@@ -225,7 +225,8 @@
finally:
for f in fs:
- f._waiters.remove(waiter)
+ with f._condition:
+ f._waiters.remove(waiter)
DoneAndNotDoneFutures = collections.namedtuple(
'DoneAndNotDoneFutures', 'done not_done')
@@ -272,7 +273,8 @@
waiter.event.wait(timeout)
for f in fs:
- f._waiters.remove(waiter)
+ with f._condition:
+ f._waiters.remove(waiter)
done.update(waiter.finished_futures)
return DoneAndNotDoneFutures(done, set(fs) - done)
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -69,6 +69,12 @@
- Issue #17481: inspect.getfullargspec() now uses inspect.signature() API.
+- Issue #15304: concurrent.futures.wait() can block forever even if
+ Futures have completed. Patch by Glenn Langford.
+
+Fix warning message when `os.chdir()` fails inside
+ `test.support.temp_cwd()`. Patch by Chris Jerdonek.
+
IDLE
----
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list