This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ncoghlan
Recipients giampaolo.rodola, gvanrossum, martin.panter, ncoghlan, pitrou, srkunze, vstinner, yselivanov
Date 2015-07-07.12:32:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1436272330.45.0.228472981574.issue24578@psf.upfronthosting.co.za>
In-reply-to
Content
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)
History
Date User Action Args
2015-07-07 12:32:10ncoghlansetrecipients: + ncoghlan, gvanrossum, pitrou, vstinner, giampaolo.rodola, martin.panter, yselivanov, srkunze
2015-07-07 12:32:10ncoghlansetmessageid: <1436272330.45.0.228472981574.issue24578@psf.upfronthosting.co.za>
2015-07-07 12:32:10ncoghlanlinkissue24578 messages
2015-07-07 12:32:10ncoghlancreate