Message316572
`ensure_future` converts the input as future if it's not already a future.
The condition is the following:
if futures.isfuture(coro_or_future):
...
elif coroutines.iscoroutine(coro_or_future):
...
elif inspect.isawaitable(coro_or_future):
...
In real world, `ensure_future` is mostly called by `run_until_complete` and gather with async function call (coroutine) as input.
We should check `iscoroutine` first to make it most efficient. |
|
Date |
User |
Action |
Args |
2018-05-14 20:45:33 | jimmylai | set | recipients:
+ jimmylai, asvetlov, yselivanov |
2018-05-14 20:45:32 | jimmylai | set | messageid: <1526330732.96.0.682650639539.issue33505@psf.upfronthosting.co.za> |
2018-05-14 20:45:32 | jimmylai | link | issue33505 messages |
2018-05-14 20:45:32 | jimmylai | create | |
|