Kaydet (Commit) 3bcf157c authored tarafından Victor Stinner's avatar Victor Stinner Kaydeden (comit) GitHub

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.
üst a15d155a
...@@ -222,11 +222,14 @@ class ProcessPoolShutdownTest(ProcessPoolMixin, ExecutorShutdownTest, BaseTestCa ...@@ -222,11 +222,14 @@ class ProcessPoolShutdownTest(ProcessPoolMixin, ExecutorShutdownTest, BaseTestCa
list(executor.map(abs, range(-5, 5))) list(executor.map(abs, range(-5, 5)))
queue_management_thread = executor._queue_management_thread queue_management_thread = executor._queue_management_thread
processes = executor._processes processes = executor._processes
call_queue = executor._call_queue
del executor del executor
queue_management_thread.join() queue_management_thread.join()
for p in processes.values(): for p in processes.values():
p.join() p.join()
call_queue.close()
call_queue.join_thread()
class WaitTests: class WaitTests:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment