April 2017
Intermediate to advanced
556 pages
11h 5m
English
The asyncio module in Python provides support for writing concurrent, single-threaded programs using co-routines. It is available only in Python 3.
A co-routine using the asyncio module is one that uses either of the following approaches:
async def statement for defining functions@asyncio.coroutine expressionGenerator-based co-routines use the second technique, and they yield from expressions.
Co-routines created using the first technique typically use the await <future> expression to wait for the future to be completed.
Co-routines are scheduled for execution using an event loop, which connects the objects and schedules them as tasks. Different types of event loop are provided for different ...
Read now
Unlock full access