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

Original file line numberDiff line numberDiff line change

@@ -2522,6 +2522,7 @@ def test_wrapped_exception(self):

25222522

with self.Pool(1) as p:

25232523

with self.assertRaises(RuntimeError):

25242524

p.apply(self._test_wrapped_exception)

2525+

p.join()

25252526
25262527

def test_map_no_failfast(self):

25272528

# Issue #23992: the fail-fast behaviour when an exception is raised

@@ -2557,6 +2558,7 @@ def test_release_task_refs(self):

25572558

# they were released too.

25582559

self.assertEqual(CountedObject.n_instances, 0)

25592560
2561+

@support.reap_threads

25602562

def test_del_pool(self):

25612563

p = self.Pool(1)

25622564

wr = weakref.ref(p)