Re: [python-tulip] Idiomatic way to wait on two different tasks?

2014-11-12 Thread Don Spaulding
That does seem better. Thanks! On Tuesday, November 11, 2014 7:16:27 PM UTC-6, Guido van Rossum wrote: I recommend calling async() to convert each coroutine to a task. Then call wait() with the tasks. You can then compare the returned task(s) directly to the input tasks. I.e.:

Re: [python-tulip] Idiomatic way to wait on two different tasks?

2014-11-11 Thread Guido van Rossum
I recommend calling async() to convert each coroutine to a task. Then call wait() with the tasks. You can then compare the returned task(s) directly to the input tasks. I.e.: ws_task = asyncio.async(websocket.recv()) redis_task = asyncio.async(redis_subscriber.next_published()) done,