有很多库使用其自定义版本的Future。kafka和s3transfer只是两个例子:它们所有自定义的类似未来的类都具有object超类。
object
毫不奇怪,您不能直接调用asyncio.wrap_future()此类对象,也不能await与它们一起使用。
asyncio.wrap_future()
await
包装此类 future 以便与 asyncio 一起使用的正确方法是什么?
python python-3.x python-asyncio concurrent.futures
concurrent.futures ×1
python ×1
python-3.x ×1
python-asyncio ×1