async with httpx.AsyncClient() as client:
r = await client.get(url)
tasks = [get_url('https://google.com') for i in range(42)]
def task_asyncio1(tasks):
loop = asyncio.get_event_loop()
loop.run_until_complete(asyncio.gather(*tasks))
task_asyncio1(tasks) # 调用
async def task_asyncio2(takss):
await asyncio.gather(*tasks)
asyncio.run(task_asyncio2(tasks)) # 调用