bpo-33676: Fix dangling thread in _test_multiprocessing (GH-10755) · python/cpython@b727873 (original) (raw)

Original file line number Diff line number Diff line change
@@ -2522,6 +2522,7 @@ def test_wrapped_exception(self):
2522 2522 with self.Pool(1) as p:
2523 2523 with self.assertRaises(RuntimeError):
2524 2524 p.apply(self._test_wrapped_exception)
2525 +p.join()
2525 2526
2526 2527 def test_map_no_failfast(self):
2527 2528 # Issue #23992: the fail-fast behaviour when an exception is raised
@@ -2557,6 +2558,7 @@ def test_release_task_refs(self):
2557 2558 # they were released too.
2558 2559 self.assertEqual(CountedObject.n_instances, 0)
2559 2560
2561 +@support.reap_threads
2560 2562 def test_del_pool(self):
2561 2563 p = self.Pool(1)
2562 2564 wr = weakref.ref(p)