PyDocs

Nav

Networking and Interprocess Communication

ensure_future

asyncio

function (source) Deprecated 3.10not WASI
  • ensure_future(obj, *, loop=None)
Deprecated since 3.10. Deprecation warning is emitted if obj is not a Future-like object and loop is not specified and there is no running event loop.
Wrap a coroutine or an awaitable in a future.

If the argument is a Future, it is returned directly.
Changed in 3.5.1
  • 3.5.1: The function accepts any awaitable object.
0 Examples
No examples for asyncio/ensure_future.
See Also
No see-alsos for asyncio/ensure_future
0 Notes
No notes for ensure_future