Why are you trying to use asyncio for this? What you are doing looks like
it needs threads, not asyncio tasks.

On Wed, Sep 2, 2015 at 12:12 AM, Ons <[email protected]> wrote:

> The tasks are completely independents and i don't want to wait until
> asyncio gathers all the results, instead i want it to run them in parallel
> and return the result whenever it is ready.
>
> The only way i have in mind that allows me to do that is to run tasks in
> different threads.
>
> On Monday, August 31, 2015 at 2:05:33 PM UTC+1, Ons wrote:
>
>> Hello,
>>
>> I am using asyncio event loop in my project and i need to make non
>> blocking calls of lets say a coroutine called async.
>>
>>     @asyncio.coroutine
>>     def async(attr1, attr2):
>>          //my coroutine code here
>>
>>  loop = asyncio.get_event_loop()
>>  result = yield from loop.run_in_executor(None, async('attr1', 'attr2'))
>>  return result
>>
>> I am getting the following error : TypeError: 'Task' object is not
>> callable.
>>
>> How can i run a coroutine in a non blocking mode with asyncio ?
>>
>> Thanks.
>>
>


-- 
--Guido van Rossum (python.org/~guido)

Reply via email to