我有以下代码:done, pending = asyncio.wait( [a, b], return_when=asyncio.FIRST_COMPLETED)但是失败了:Traceback (most recent call last): ... File "/.../api.py", line 83, in websockets_handler return_when=asyncio.FIRST_COMPLETED)TypeError: cannot unpack non-iterable coroutine object
1 回答
FFIVE
TA贡献1797条经验 获得超6个赞
好吧,应该await在asyncio.wait:)前面
done, pending = await asyncio.wait(
[a, b],
return_when=asyncio.FIRST_COMPLETED)
添加回答
举报
0/150
提交
取消