diff options
author | Ross Lagerwall <rosslagerwall@gmail.com> | 2012-01-08 08:29:40 +0200 |
---|---|---|
committer | Ross Lagerwall <rosslagerwall@gmail.com> | 2012-01-08 08:29:40 +0200 |
commit | d3321c8de8c338083b1fd7c00dfae4bb2c49304f (patch) | |
tree | 39c362079db4b0c53fb90eac1ca09d78f0b2b5cb /Lib/test/test_concurrent_futures.py | |
parent | fc9ce2051a6152e9b7c5a7f5e08a4d587fdf0a04 (diff) | |
download | cpython-d3321c8de8c338083b1fd7c00dfae4bb2c49304f.tar.gz |
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 6cc57f85d0..372da27dca 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): |