diff options
author | Kyle Stanley <aeros167@gmail.com> | 2020-04-02 02:46:44 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-02 02:46:44 (GMT) |
commit | 8ec7cb53f0705509bac20c96d19fdbd9baec0cb2 (patch) | |
tree | 0968598a4bd8fde1ab7da79d3675adcf72c60b0e /Lib/test/test_asyncio | |
parent | e7c98f08e228e9f6e139d61e3e5d0a5018a38f0b (diff) | |
download | cpython-8ec7cb53f0705509bac20c96d19fdbd9baec0cb2.zip cpython-8ec7cb53f0705509bac20c96d19fdbd9baec0cb2.tar.gz cpython-8ec7cb53f0705509bac20c96d19fdbd9baec0cb2.tar.bz2 |
bpo-40115: Fix refleak in test_asyncio.test_run_in_executor_cancel() (GH-19282)
Call explicitly self.loop.shutdown_default_executor().
Diffstat (limited to 'Lib/test/test_asyncio')
-rw-r--r-- | Lib/test/test_asyncio/test_events.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_asyncio/test_events.py b/Lib/test/test_asyncio/test_events.py index 4bdf82e..1f71c1f 100644 --- a/Lib/test/test_asyncio/test_events.py +++ b/Lib/test/test_asyncio/test_events.py @@ -365,6 +365,8 @@ class EventLoopTestsMixin: f2 = self.loop.run_in_executor(None, run) f2.cancel() + self.loop.run_until_complete( + self.loop.shutdown_default_executor()) self.loop.close() self.loop.call_soon = patched_call_soon self.loop.call_soon_threadsafe = patched_call_soon |