Skip to content

Commit 3bcf157

Browse files
authored
bpo-31249: Fix test_concurrent_futures dangling thread (#3521)
ProcessPoolShutdownTest.test_del_shutdown() now closes the call queue and joins its thread, to prevent leaking a dangling thread.
1 parent a15d155 commit 3bcf157

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

Lib/test/test_concurrent_futures.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,11 +222,14 @@ def test_del_shutdown(self):
222222
list(executor.map(abs, range(-5, 5)))
223223
queue_management_thread = executor._queue_management_thread
224224
processes = executor._processes
225+
call_queue = executor._call_queue
225226
del executor
226227

227228
queue_management_thread.join()
228229
for p in processes.values():
229230
p.join()
231+
call_queue.close()
232+
call_queue.join_thread()
230233

231234

232235
class WaitTests:

0 commit comments

Comments
 (0)