summaryrefslogtreecommitdiff
path: root/Lib
diff options
context:
space:
mode:
authorRoss Lagerwall <rosslagerwall@gmail.com>2012-01-08 08:42:03 +0200
committerRoss Lagerwall <rosslagerwall@gmail.com>2012-01-08 08:42:03 +0200
commit69f39a53f62734d3e8dcb4bdcc217c4b3551d393 (patch)
tree1baf6ceb8e888f0acd7a4c717f32bda2ecfab39f /Lib
parent75404274344794012da83362f32b6e1786ef04df (diff)
parent66e2fb68aca2a2678a327b200e657b761f358bc1 (diff)
downloadcpython-git-69f39a53f62734d3e8dcb4bdcc217c4b3551d393.tar.gz
Merge with 3.2 for #12364.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/concurrent/futures/process.py3
-rw-r--r--Lib/test/test_concurrent_futures.py6
2 files changed, 6 insertions, 3 deletions
diff --git a/Lib/concurrent/futures/process.py b/Lib/concurrent/futures/process.py
index 0575146b22..7f31ec2263 100644
--- a/Lib/concurrent/futures/process.py
+++ b/Lib/concurrent/futures/process.py
@@ -273,9 +273,6 @@ def _queue_management_worker(executor_reference,
if not pending_work_items:
shutdown_worker()
return
- else:
- # Start shutting down by telling a process it can exit.
- call_queue.put_nowait(None)
except Full:
# This is not a problem: we will eventually be woken up (in
# result_queue.get()) and be able to send a sentinel again.
diff --git a/Lib/test/test_concurrent_futures.py b/Lib/test/test_concurrent_futures.py
index 7522a54acb..04ee246083 100644
--- a/Lib/test/test_concurrent_futures.py
+++ b/Lib/test/test_concurrent_futures.py
@@ -109,6 +109,12 @@ class ExecutorShutdownTest(unittest.TestCase):
self.assertFalse(err)
self.assertEqual(out.strip(), b"apple")
+ def test_hang_issue12364(self):
+ fs = [self.executor.submit(time.sleep, 0.1) for _ in range(50)]
+ self.executor.shutdown()
+ for f in fs:
+ f.result()
+
class ThreadPoolShutdownTest(ThreadPoolMixin, ExecutorShutdownTest):
def _prime_executor(self):