Message374679
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 |
|
Date |
User |
Action |
Args |
2020-08-02 06:40:35 | cielpy | set | recipients:
+ cielpy, asvetlov, yselivanov |
2020-08-02 06:40:35 | cielpy | set | messageid: <1596350435.61.0.637126528224.issue41456@roundup.psfhosted.org> |
2020-08-02 06:40:35 | cielpy | link | issue41456 messages |
2020-08-02 06:40:35 | cielpy | create | |
|