September 2026
1051 pages
35h 4m
English
Cooperative multitasking represents a third approach to parallel programming in Python, in addition to the concurrent.futures and threading or multiprocessing interfaces described so far. The central idea here is that functions working in parallel cooperate with each other.
The term cooperation is used here to express that cooperative functions, or coroutines, independently signal appropriate times at which they may be interrupted. This is especially the case when the function itself must wait for an external event, such as a file access.
An instance that’s running on a higher level and referred to as an event loop detects when a coroutine signals that it’s waiting for an external event and can also detect when ...
Read now
Unlock full access