What this book covers
Chapter 1, Concurrency: A High-Level Overview, talks about what concurrency is and what it isn’t – in particular, how it relates to parallelism. Shared memory and message-passing paradigms, and common concurrency concepts such as race, atomicity, liveness, and deadlock are also introduced in this chapter.
Chapter 2, Go Concurrency Primitives, introduces Go language primitives for concurrent programming – namely, goroutines, channels, mutexes, wait groups, and condition variables.
Chapter 3, The Go Memory Model, talks about the visibility guarantees of memory operations. It introduces the happened-before relationship that allows you to reason about concurrent behavior, then gives the memory visibility guarantees of concurrency primitives and some of the standard library facilities.
Chapter 4, Some Well-Known Concurrency Problems, studies the well-known producer/consumer problem, the dining philosophers problem, and rate-limiting.
Chapter 5, Worker Pools and Pipelines, first studies worker pools, which is a common way to process large amounts of data with limited concurrency. Then, it develops several concurrent data pipeline implementations for efficient data processing applications.
Chapter 6, Error Handling, explores how to deal with errors and panics in a concurrent program, and how to pass errors around.
Chapter 7, Timers and Tickers, shows how to do things periodically and how to do things some time later.
Chapter 8, Handling Requests Concurrently, mostly talks about server programming, but many of the concepts discussed in this chapter are broadly about handling requests, so they can be applied in a wide range of scenarios. It describes how to use context effectively, how to distribute work and collect results, how to limit concurrency, and how to stream data.
Chapter 9, Atomic Memory Operations, covers atomic memory operations, their memory guarantees, and their practical uses.
Chapter 10, Troubleshooting Concurrency Issues, talks about the underrated but essential skill of reading stack traces, and how to detect failures and heal them at runtime.