This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author cielpy
Recipients asvetlov, cielpy, yselivanov
Date 2020-08-02.06:40:35
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1596350435.61.0.637126528224.issue41456@roundup.psfhosted.org>
In-reply-to
Content
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
History
Date User Action Args
2020-08-02 06:40:35cielpysetrecipients: + cielpy, asvetlov, yselivanov
2020-08-02 06:40:35cielpysetmessageid: <1596350435.61.0.637126528224.issue41456@roundup.psfhosted.org>
2020-08-02 06:40:35cielpylinkissue41456 messages
2020-08-02 06:40:35cielpycreate