Skip to content

Commit 8ec7cb5

Browse files
authored
bpo-40115: Fix refleak in test_asyncio.test_run_in_executor_cancel() (GH-19282)
Call explicitly self.loop.shutdown_default_executor().
1 parent e7c98f0 commit 8ec7cb5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Lib/test/test_asyncio/test_events.py

+2
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,8 @@ def run():
365365

366366
f2 = self.loop.run_in_executor(None, run)
367367
f2.cancel()
368+
self.loop.run_until_complete(
369+
self.loop.shutdown_default_executor())
368370
self.loop.close()
369371
self.loop.call_soon = patched_call_soon
370372
self.loop.call_soon_threadsafe = patched_call_soon

0 commit comments

Comments
 (0)