Skip to content

Commit 0ce1f7e

Browse files
authored
bpo-30110: fix resource leak in test_asyncio.test_events (#1413) (#1584)
1 parent 61b6e5c commit 0ce1f7e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Lib/test/test_asyncio/test_events.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2194,8 +2194,10 @@ def tearDown(self):
21942194
def test_get_event_loop_new_process(self):
21952195
async def main():
21962196
pool = concurrent.futures.ProcessPoolExecutor()
2197-
return await self.loop.run_in_executor(
2197+
result = await self.loop.run_in_executor(
21982198
pool, _test_get_event_loop_new_process__sub_proc)
2199+
pool.shutdown()
2200+
return result
21992201

22002202
self.unpatch_get_running_loop()
22012203

0 commit comments

Comments
 (0)