New submission from Guo Xiyong <beijiu...@gmail.com>:
code like this: import asyncio import time import threading def sync_test(): time.sleep(1) async def run_test(): loop = asyncio.get_event_loop() for _ in range(10): # r = await loop.getaddrinfo('wq.io', 443) # print(r) loop.run_in_executor(None, sync_test) for t in threading.enumerate(): print(t) while True: await asyncio.sleep(1) asyncio.run(run_test()) after run, the 10 thread will always exist ---------- components: asyncio messages: 374679 nosy: asvetlov, cielpy, yselivanov priority: normal severity: normal status: open title: loop.run_in_executor creat thread but not destory it after the task run over versions: Python 3.7 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue41456> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com