summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXiang Zhang <angwerzx@126.com>2017-05-15 03:56:40 (GMT)
committerGitHub <noreply@github.com>2017-05-15 03:56:40 (GMT)
commit7c278a5eeb656c2b48a85bbd761ce165f1751bb6 (patch)
tree4aef7f669e58c1f8895a0ce78ca148659917f401
parent96f502856796f9310fed7161dc540201a4afc1ee (diff)
downloadcpython-7c278a5eeb656c2b48a85bbd761ce165f1751bb6.zip
cpython-7c278a5eeb656c2b48a85bbd761ce165f1751bb6.tar.gz
cpython-7c278a5eeb656c2b48a85bbd761ce165f1751bb6.tar.bz2
bpo-30110: fix resource leak in test_asyncio.test_events (#1413)
-rw-r--r--Lib/test/test_asyncio/test_events.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/test_asyncio/test_events.py b/Lib/test/test_asyncio/test_events.py
index 802763b..492a84a 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()