July 2017
Beginner to intermediate
340 pages
7h 43m
English
The general principle of asynchronous programming is that the process deals with several concurrent execution contexts to simulate parallelism.
Asynchronous applications use an event loop that pauses and resumes execution contexts when an event is triggered--only one context is active, and they take turns. Explicit instruction in the code will tell the event loop that this is where it can pause the execution.
When that occurs, the process will look for some other pending work to resume. Eventually, the process will come back to your function and continue it where it stopped. Moving from an execution context to another is called switching.
The Greenlet project (https://github.com/python-greenlet/greenlet) is a package based ...