Concurrency is the act of doing two things at the same time. On a single-core processor, this means multitasking. When multitasking, an operating system will switch between running processes to give each of them a share of time to use the processor. On a multi-core processor, concurrent processes can run simultaneously.
In this chapter, we will look at different models of concurrency. Some of these tools are relevant, others are used more for educational purposes. Here, we recommend and explain the thread model of concurrency. Further, we will explain how functional design patterns can make it easier to develop programs that use concurrency effectively.
Learning outcomes will include the following:
- Recognizing and applying subprocess concurrency appropriately
- Understanding the nix fork concurrency model and its benefits
- Recognizing and applying thread...