Adding run_in_executor task to already existing loop.
Zachary Ware
zachary.ware+pylist at gmail.com
Fri Mar 25 17:00:48 EDT 2016
On Fri, Mar 25, 2016 at 3:56 PM, Marko Rauhamaa <marko at pacujo.net> wrote:
> Ray Cote <rgacote at appropriatesolutions.com>:
>
>> I’m trying to perform an synchronous task while using asyncio.
>
> You seem to want to do something you shouldn't be doing. Asyncio does
> not tolerate synchronous/blocking calls. You will need to move those in
> separate threads or processes if you can't turn them into asynchronous
> tasks.
That's exactly what run_in_executor does.
--
Zach
More information about the Python-list
mailing list