假设我们有
await async_function_one_with_large_IO_request()
await async_function_two_with_large_IO_request()对比
asyncio.gather(
async_function_one_with_large_IO_request(),
async_function_two_with_large_IO_request())在第一个版本中,一旦我们访问了函数one的“大型io请求”部分,它就会转到运行function_two,这就是await的全部要点,对吗?
这难道不是与with一起的第2版所做的吗?
两人的表现有什么不同?
https://stackoverflow.com/questions/72265567
复制相似问题