[3.6] bpo-31249: Fix test_concurrent_futures dangling thread (GH-3521… · python/cpython@94eb2d5 (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Commit 94eb2d5
authored and
committed
ProcessPoolShutdownTest.test_del_shutdown() now closes the call queue and joins its thread, to prevent leaking a dangling thread. (cherry picked from commit 3bcf157)
File tree
1 file changed
lines changed
1 file changed
lines changed
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -226,11 +226,14 @@ def test_del_shutdown(self): | ||
226 | 226 | list(executor.map(abs, range(-5, 5))) |
227 | 227 | queue_management_thread = executor._queue_management_thread |
228 | 228 | processes = executor._processes |
229 | +call_queue = executor._call_queue | |
229 | 230 | del executor |
230 | 231 | |
231 | 232 | queue_management_thread.join() |
232 | 233 | for p in processes.values(): |
233 | 234 | p.join() |
235 | +call_queue.close() | |
236 | +call_queue.join_thread() | |
234 | 237 | |
235 | 238 | |
236 | 239 | class WaitTests: |