bpo-30110: fix resource leak in test_asyncio.test_events (#1413)

This commit is contained in:
Xiang Zhang 2017-05-15 11:56:40 +08:00 committed by GitHub
parent 96f5028567
commit 7c278a5eeb
1 changed files with 3 additions and 1 deletions

View 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()