CONCURRENCY AND PARALLELISM FOR PROGRAMMERS: Write Correct, Efficient Code with Threads, Tasks, Locks, and Atomics
HALSTEAD, CORIN
Synopsis "CONCURRENCY AND PARALLELISM FOR PROGRAMMERS: Write Correct, Efficient Code with Threads, Tasks, Locks, and Atomics"
Write faster software. Build safer systems. Master the hidden complexity of modern concurrency. Modern applications are concurrent by default. Web servers handle thousands of requests, user interfaces remain responsive while work happens in the background, cloud services coordinate multiple operations, and processors execute workloads across multiple cores. But concurrency introduces a new class of problems. A program may work perfectly during testing and fail under production load. A lock may prevent one race while creating another. An atomic operation may protect a variable but still violate a larger application rule. A task may improve responsiveness while overwhelming a critical resource. Concurrency and Parallelism for Programmers provides a practical, language-independent approach to designing software that remains correct, efficient, and maintainable when multiple activities happen at the same time. Inside this book, you will learn how to: • Understand the difference between concurrency and parallelism and choose the right approach for each problem • Design thread-safe software using ownership, immutability, confinement, and synchronization principles • Prevent race conditions, deadlocks, starvation, and unsafe shared-state behavior • Use threads, tasks, futures, executors, and structured concurrency effectively • Build reliable asynchronous systems with event loops, cancellation, and backpressure • Understand memory visibility, ordering, atomic operations, and happens-before relationships • Apply locks, mutexes, semaphores, channels, and concurrent collections correctly • Design scalable parallel algorithms using decomposition, workload partitioning, and performance analysis • Test and debug concurrency problems using stress testing, race detection, profiling, and observability techniques • Apply production architecture patterns for bounded concurrency, resilient workflows, and high-performance systems Whether you are a software developer, backend engineer, systems programmer, cloud engineer, computer science student, or technical professional, this book will help you develop the mental models required to build modern software that handles real workloads safely. Concurrency is not simply about making code execute faster. It is about understanding what can happen when work overlaps—and designing systems that remain correct under every possible schedule. Build software that is not only faster. Build software you can trust.