mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue #12364: Fix a hang in concurrent.futures.ProcessPoolExecutor.
This commit is contained in:
parent
645a0dd6f7
commit
66e2fb68ac
3 changed files with 11 additions and 6 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue