March 2019
Beginner
490 pages
12h 40m
English
The asyncio module provides the asyncio.Task() method to handle coroutines with tasks. The asyncio.Task class is a subclass of asyncio. Future and aims are used to manage coroutines. A task is responsible for the execution of a coroutine object in an event loop. When a coroutine is wrapped in a task, it connects the task to the event loop and then runs automatically when the loop is started, thus providing a mechanism to automatically drive the coroutine.
You can find the following code in the asyncio_task.py file:
#!/usr/bin/python3import asyncioimport time@asyncio.coroutine ...
Read now
Unlock full access