Home
last modified time | relevance | path

Searched refs:coro_or_future (Results 1 – 2 of 2) sorted by relevance

/external/python/cpython3/Lib/asyncio/
Dtasks.py481 def async_(coro_or_future, *, loop=None): argument
493 return ensure_future(coro_or_future, loop=loop)
501 def ensure_future(coro_or_future, *, loop=None): argument
506 if futures.isfuture(coro_or_future):
507 if loop is not None and loop is not coro_or_future._loop:
509 return coro_or_future
510 elif coroutines.iscoroutine(coro_or_future):
513 task = loop.create_task(coro_or_future)
517 elif compat.PY35 and inspect.isawaitable(coro_or_future):
518 return ensure_future(_wrap_awaitable(coro_or_future), loop=loop)
/external/python/cpython3/Doc/library/
Dasyncio-task.rst521 .. function:: ensure_future(coro_or_future, \*, loop=None)
537 .. function:: async(coro_or_future, \*, loop=None)