Synchronously adding tasks to asyncio event loop and ensuring their execution

前端 未结 0 1683
迷失自我
迷失自我 2021-02-12 13:49
import asyncio


async def print_number(num):
    if num % 2 == 0:
        await asyncio.sleep(1)
    print(num)


def add_tasks():
    current_loop = asyncio.get_runnin         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题