Skip to content

Commit 94eb2d5

Browse files
miss-islingtonvstinner
authored andcommitted
[3.6] bpo-31249: Fix test_concurrent_futures dangling thread (GH-3521) (#3522)
ProcessPoolShutdownTest.test_del_shutdown() now closes the call queue and joins its thread, to prevent leaking a dangling thread. (cherry picked from commit 3bcf157)
1 parent bcf042f commit 94eb2d5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

‎Lib/test/test_concurrent_futures.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,11 +226,14 @@ def test_del_shutdown(self):
226226
list(executor.map(abs, range(-5, 5)))
227227
queue_management_thread = executor._queue_management_thread
228228
processes = executor._processes
229+
call_queue = executor._call_queue
229230
del executor
230231

231232
queue_management_thread.join()
232233
for p in processes.values():
233234
p.join()
235+
call_queue.close()
236+
call_queue.join_thread()
234237

235238

236239
class WaitTests:

0 commit comments

Comments
 (0)