summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2017-09-13 00:43:44 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2017-09-13 00:43:44 (GMT)
commit94eb2d5b73d07bc447f1fe19923b4c3259734b9c (patch)
treef671d8521772ab20d6a94c717d6577a40bd78b7f
parentbcf042ff98b6261b7780c1e40fa1681ef30502f9 (diff)
downloadcpython-94eb2d5b73d07bc447f1fe19923b4c3259734b9c.zip
cpython-94eb2d5b73d07bc447f1fe19923b4c3259734b9c.tar.gz
cpython-94eb2d5b73d07bc447f1fe19923b4c3259734b9c.tar.bz2
[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 3bcf157c115ba3e48bce62ac8cb13c703475a113)
-rw-r--r--Lib/test/test_concurrent_futures.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_concurrent_futures.py b/Lib/test/test_concurrent_futures.py
index 03f8d1d..e5d6b7e 100644
--- a/Lib/test/test_concurrent_futures.py
+++ b/Lib/test/test_concurrent_futures.py
@@ -226,11 +226,14 @@ class ProcessPoolShutdownTest(ProcessPoolMixin, ExecutorShutdownTest, BaseTestCa
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: