crenwick added the comment:
> Feel free to suggest a better wording.
> I think the only change that needs to be made is to make the existing message
> say 'asyncio.Future' instead of just 'Future'.
I hear ya. New commit in the PR reverts the TypeError I add
crenwick added the comment:
Totally understandable. Some final thoughts:
> this is the first time I see somebody tries to use `ensure_future` on
> `run_coroutine_threadsafe` result, which suggests that it's not a common
> problem.
- I wonder how much self-reporting will be do
crenwick added the comment:
> it already raises a TypeError with a clear message
This is more to my point: I found the TypeError message not clear at all.
>From my prospective, I was using a future object returned from an asyncio
>function to call another asyncio function, yet that
crenwick added the comment:
Totally. But this wasn't immediately clear to me when using the API. A verbose
error like this one would have made this behavior more clear to me.
--
___
Python tracker
<http://bugs.python.org/is
New submission from crenwick:
Despite the shy mention in the docs, it was not clear to me that the future
returned from asyncio.run_coroutine_threadsafe is not compatible with
asyncio.ensure_future (and other asyncio functions), and it took me a fair
amount of frustration and source-code