In this chapter, we looked at the reason to control parallelism and developed an appreciation for the complexity of the task when a shared state is involved. We used the example of an overworked cashier as a programming problem to solve and to experiment with channels, and further explored different types of channels and the nuances involved with using them. For example, we saw that both closed buffered and unbuffered channels will cause panic if we try to send messages on them, and receiving messages from them leads to different results based on whether the channel is buffered and if the channel is empty or full. We also saw how to wait on multiple channels without blocking on any with the help of select.
In later chapters, from Chapter 5, Introducing Goophr, through to Chapter 8, Deploying Goophr, we will be developing a distributed web application. This requires us...