Author jimmylai
Recipients asvetlov, jimmylai, yselivanov
Date 2018-05-14.20:45:32
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1526330732.96.0.682650639539.issue33505@psf.upfronthosting.co.za>
In-reply-to
Content
`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.
History
Date User Action Args
2018-05-14 20:45:33jimmylaisetrecipients: + jimmylai, asvetlov, yselivanov
2018-05-14 20:45:32jimmylaisetmessageid: <1526330732.96.0.682650639539.issue33505@psf.upfronthosting.co.za>
2018-05-14 20:45:32jimmylailinkissue33505 messages
2018-05-14 20:45:32jimmylaicreate