Issue #12364: Fix a hang in concurrent.futures.ProcessPoolExecutor.

This commit is contained in:
Ross Lagerwall 2012-01-08 08:29:40 +02:00
parent 645a0dd6f7
commit 66e2fb68ac
3 changed files with 11 additions and 6 deletions

View file

@ -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):