]> granicus.if.org Git - python/commitdiff
bpo-30110: fix resource leak in test_asyncio.test_events (#1413)
authorXiang Zhang <angwerzx@126.com>
Mon, 15 May 2017 03:56:40 +0000 (11:56 +0800)
committerGitHub <noreply@github.com>
Mon, 15 May 2017 03:56:40 +0000 (11:56 +0800)
Lib/test/test_asyncio/test_events.py

index 802763bd11ff611ee221904080dd62aa4566afd0..492a84a2313bafb7c60a7e4773c4d47ee27b4664 100644 (file)
@@ -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()