In the previous chapter, we learned how to use threads to implement concurrent applications. This chapter will examine the process-based approach that we introduced in Chapter 1, Getting Started with Parallel Computing and Python. In particular, the focus of the chapter is on the Python multiprocessing module.
The Python multiprocessing module, which is a part of the standard library of the language, implements the shared memory programming paradigm, that is, the programming of a system that consists of one or more processors that have access to a shared memory.
In this chapter, we will cover the following recipes:
- Understanding Python's multiprocessing module
- Spawning a process
- Naming a process
- Running processes in the background
- Killing a process
- Defining a process in a subclass
- Using a queue to exchange objects
- Using pipes...