Re: concurrent futures, async futures and await

2017-02-26 Thread Nagy László Zsolt
>> >> 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

Re: concurrent futures, async futures and await

2017-02-23 Thread Ian Kelly
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

Re: concurrent futures, async futures and await

2017-02-23 Thread Nagy László Zsolt
> 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

Re: concurrent futures, async futures and await

2017-02-22 Thread Ian Kelly
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