>>
>> Simply because the concurrent future returned by executor.submit does
>> not implement __await__ and so it cannot be awaited for.
> I get that, but what happens if you try wrapping the executor.submit
> call with tornado.gen.convert_yielded as the tornado docs suggest and
> as I suggested a
On Thu, Feb 23, 2017 at 9:44 AM, Nagy László Zsolt wrote:
>
>> My guess: because asyncio wouldn't know what to do with a
>> concurrent.futures.Future.
> I see that as a problem.
>>
>> The tornado docs say that "You can also use
>> tornado.gen.convert_yielded to convert anything that would work wit
> My guess: because asyncio wouldn't know what to do with a
> concurrent.futures.Future.
I see that as a problem.
>
> The tornado docs say that "You can also use
> tornado.gen.convert_yielded to convert anything that would work with
> yield into a form that will work with await":
> http://www.torn
On Wed, Feb 22, 2017 at 12:50 PM, Nagy László Zsolt
wrote:
>
> I'm in a situation where I would like to refactor some code to use
> native coroutine functions (aync def) instead of "normal" coroutines
> that use yield. Most of the code is asnyc, but some of the operations
> are performed in differ
I'm in a situation where I would like to refactor some code to use
native coroutine functions (aync def) instead of "normal" coroutines
that use yield. Most of the code is asnyc, but some of the operations
are performed in different threads (using concurrent.futures.Executor).
We have concurrent.