Concurrency and one of its manifestations, parallel processing, is one of the broadest topics in the area of software engineering. It is so huge that it could take dozens of books and we would still not be able to discuss all of its important aspects and models.
This is why I won't try to fool you and from the very beginning state that we will barely touch the surface of this topic. The purpose of this chapter is to show you why concurrency may be required in your application, when to use it, and what the most important concurrency models that you may use in Python are, which are the following:
- Multithreading
- Multiprocessing
- Asynchronous programming
We will also discuss some of the language features, built-in modules, and third-party packages that allow you to implement these models in your code. But we won't cover them in much detail. Treat the content...