From 02457fb9752bac4d786f6166bbc275c807e47165 Mon Sep 17 00:00:00 2001 From: Xiang Zhang Date: Wed, 3 May 2017 12:16:41 +0800 Subject: [PATCH] bpo-30110: fix resource leak in test_asyncio.test_events --- Lib/test/test_asyncio/test_events.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Lib/test/test_asyncio/test_events.py b/Lib/test/test_asyncio/test_events.py index 802763bd11ff611..492a84a2313bafb 100644 --- a/Lib/test/test_asyncio/test_events.py +++ b/Lib/test/test_asyncio/test_events.py @@ -2194,8 +2194,10 @@ def tearDown(self): def test_get_event_loop_new_process(self): async def main(): pool = concurrent.futures.ProcessPoolExecutor() - return await self.loop.run_in_executor( + result = await self.loop.run_in_executor( pool, _test_get_event_loop_new_process__sub_proc) + pool.shutdown() + return result self.unpatch_get_running_loop()