Message246406
It occurs to me that given both this API and the "call_async()" API now proposed in issue 24571, otherwise synchronous code can do things like:
futureB = asyncio.call_async(slow_io_bound_operation)
futureC = asyncio.call_async(another_slow_io_bound_operation)
a = calculateA()
b = asyncio.wait_for_result(futureB)
c = asyncio.wait_for_result(futureC)
Which still reads well when combined with await:
b = await asyncio.call_async(blocking_operation) |
|
Date |
User |
Action |
Args |
2015-07-07 12:32:10 | ncoghlan | set | recipients:
+ ncoghlan, gvanrossum, pitrou, vstinner, giampaolo.rodola, martin.panter, yselivanov, srkunze |
2015-07-07 12:32:10 | ncoghlan | set | messageid: <1436272330.45.0.228472981574.issue24578@psf.upfronthosting.co.za> |
2015-07-07 12:32:10 | ncoghlan | link | issue24578 messages |
2015-07-07 12:32:10 | ncoghlan | create | |
|