diff options
author | Ross Lagerwall <rosslagerwall@gmail.com> | 2012-01-08 06:29:40 (GMT) |
---|---|---|
committer | Ross Lagerwall <rosslagerwall@gmail.com> | 2012-01-08 06:29:40 (GMT) |
commit | 66e2fb68aca2a2678a327b200e657b761f358bc1 (patch) | |
tree | f5037c0da90ca27dd2977d30fb8fb29ae8394431 /Lib/test/test_concurrent_futures.py | |
parent | 645a0dd6f79004652c52ae9d7246d1b219772588 (diff) | |
download | cpython-66e2fb68aca2a2678a327b200e657b761f358bc1.zip cpython-66e2fb68aca2a2678a327b200e657b761f358bc1.tar.gz cpython-66e2fb68aca2a2678a327b200e657b761f358bc1.tar.bz2 |
Issue #12364: Fix a hang in concurrent.futures.ProcessPoolExecutor.
Diffstat (limited to 'Lib/test/test_concurrent_futures.py')
-rw-r--r-- | Lib/test/test_concurrent_futures.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_concurrent_futures.py b/Lib/test/test_concurrent_futures.py index 6cc57f8..372da27 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): |