]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #14406: Fix a race condition when using `concurrent.futures.wait(return_when...
authorAntoine Pitrou <solipsis@pitrou.net>
Sat, 31 Mar 2012 18:25:22 +0000 (20:25 +0200)
committerAntoine Pitrou <solipsis@pitrou.net>
Sat, 31 Mar 2012 18:25:22 +0000 (20:25 +0200)
Patch by Matt Joiner.

1  2 
Lib/concurrent/futures/_base.py
Lib/test/test_concurrent_futures.py
Misc/NEWS

Simple merge
index 04ee246083ec48dfedd52620a8170977843bbaad,2afa93802e2601728cb2126ff9546d4f59a0270a..6ae450df066e9d37d077ac8c8322029974d2dd26
@@@ -180,10 -180,12 +180,12 @@@ class ProcessPoolShutdownTest(ProcessPo
          del executor
  
          queue_management_thread.join()
 -        for p in processes:
 +        for p in processes.values():
              p.join()
  
  class WaitTests(unittest.TestCase):
      def test_first_completed(self):
          future1 = self.executor.submit(mul, 21, 2)
          future2 = self.executor.submit(time.sleep, 1.5)
diff --cc Misc/NEWS
index 5c93c0a7921cadf5aded4d2143f275826963d3f8,d814b17ff9c72c7f210f09d57c2048698453be66..4e8515b1019d1d1a8be5b470c7baae4b6747b628
+++ b/Misc/NEWS
@@@ -37,8 -31,9 +37,11 @@@ Core and Builtin
  Library
  -------
  
+ - Issue #14406: Fix a race condition when using ``concurrent.futures.wait(
+   return_when=ALL_COMPLETED)``.  Patch by Matt Joiner.
 +- Issue #5136: deprecate old, unused functions from tkinter.
 +
  - Issue #14409: IDLE now properly executes commands in the Shell window
    when it cannot read the normal config files on startup and
    has to use the built-in default key bindings.