Nick Coghlan added the comment:
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)
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue24578>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com