Summary
Explore how Python handles concurrency by learning about threads, multiprocessing, and AsyncIO. Understand the strengths and limitations of each approach, and discover how futures and coroutines provide object-oriented abstractions for managing concurrent tasks. Gain insight into designing efficient concurrent programs by comparing different methods and measuring their performance.
Recall
We’ve looked closely at a variety of topics related to concurrent processing in Python:
- Threads have an advantage of simplicity for many cases. This has to be balanced against the GIL interfering with compute-intensive multi-threading.
- Multiprocessing has an advantage of making full use of all cores of a processor. This has to be balanced against interprocess communication costs. If shared memory is used, there is the