June 2017
Beginner to intermediate
274 pages
6h 49m
English
The asyncio package automatically creates a default scheduler, also called event_loop.
While it's possible to create new event_loop objects or replace the default one, for our purposes, the default event_loop scheduler will work just fine. We could get a reference to it by calling asyncio's get_event_loop function to tell the scheduler that we want it to start a new task, as shown here:

When we run the preceding coroutine, we call asyncio's ensure_future function. By default, this will create the task in the default scheduler.
Read now
Unlock full access