From 5a32032779ca6ecf8632460b3b2916182fef329d Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Wed, 13 Sep 2017 01:47:21 +0200 Subject: [PATCH] bpo-31249: Fix test_concurrent_futures dangling thread ProcessPoolShutdownTest.test_del_shutdown() now closes the call queue and joins its thread, to prevent leaking a dangling thread. --- Lib/test/test_concurrent_futures.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Lib/test/test_concurrent_futures.py b/Lib/test/test_concurrent_futures.py index a888dcacc49160b..7bc733efb1eeb91 100644 --- a/Lib/test/test_concurrent_futures.py +++ b/Lib/test/test_concurrent_futures.py @@ -222,11 +222,14 @@ def test_del_shutdown(self): list(executor.map(abs, range(-5, 5))) queue_management_thread = executor._queue_management_thread processes = executor._processes + call_queue = executor._call_queue del executor queue_management_thread.join() for p in processes.values(): p.join() + call_queue.close() + call_queue.join_thread() class WaitTests: