Message246405
| Author |
ncoghlan |
| Recipients |
giampaolo.rodola, gvanrossum, ncoghlan, pitrou, srkunze, vstinner, yselivanov |
| Date |
2015年07月07日.12:31:41 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1436272302.18.0.741364108485.issue24571@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
After trying out some example code in issue 24578, I've changed the suggestion function name to "call_async". The reason is because it makes this kind of code read quite well:
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)
And still reads well when combined with await:
b = await asyncio.call_async(blocking_operation) |
|