asyncio.ensure_future()

asyncio.ensure_future(coro_or_future, *, loop=None)

Schedule the execution of a coroutine object: wrap it in a future. Return a Task object.

If the argument is a Future, it is returned directly.

New in version 3.4.4.

Changed in version 3.5.1: The function accepts any awaitable object.

See also

The AbstractEventLoop.create_task() method.

doc_python
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.