修复Python 3.11 asyncio.wait报错

close #120
This commit is contained in:
John Smith 2023-08-28 19:28:52 +08:00
parent 3d9095536d
commit 5bdf2e41df

View File

@ -184,7 +184,7 @@ async def _pop_task() -> TranslateTask:
return queue.get_nowait()
done_future_set, pending_future_set = await asyncio.wait(
[queue.get() for queue in _task_queues],
[asyncio.create_task(queue.get()) for queue in _task_queues],
return_when=asyncio.FIRST_COMPLETED
)
for future in pending_future_set: