From: Xiang Zhang Date: Mon, 15 May 2017 03:56:40 +0000 (+0800) Subject: bpo-30110: fix resource leak in test_asyncio.test_events (#1413) X-Git-Tag: v3.7.0a1~816 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7c278a5eeb656c2b48a85bbd761ce165f1751bb6;p=python bpo-30110: fix resource leak in test_asyncio.test_events (#1413) --- diff --git a/Lib/test/test_asyncio/test_events.py b/Lib/test/test_asyncio/test_events.py index 802763bd11..492a84a231 100644 --- a/Lib/test/test_asyncio/test_events.py +++ b/Lib/test/test_asyncio/test_events.py @@ -2194,8 +2194,10 @@ else: 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()