This bestseller has been updated and revised to cover all the latest changes to C++ 14 and 17! C++ Concurrency in Action, Second Edition teaches you everything you need to write robust and elegant multithreaded applications in C++17.
about the technology
You choose C++ when your applications need to run fast. Well-designed concurrency makes them go even faster. C++ 17 delivers strong support for the multithreaded, multiprocessor programming required for fast graphic processing, machine learning, and other performance-sensitive tasks. This exceptional book unpacks the features, patterns, and best practices of production-grade C++ concurrency.
about the book
C++ Concurrency in Action, Second Edition is the definitive guide to writing elegant multithreaded applications in C++. Updated for C++ 17, it carefully addresses every aspect of concurrent development, from starting new threads to designing fully functional multithreaded algorithms and data structures. Concurrency master Anthony Williams presents examples and practical tasks in every chapter, including insights that will delight even the most experienced developer.
what's inside
Full coverage of new C++ 17 features
Starting and managing threads
Synchronizing concurrent operations
Designing concurrent code
Debugging multithreaded applications
about the reader
Written for intermediate C and C++ developers. No prior experience with concurrency required.
about the author
Anthony Williams has been an active member of the BSI C++ Panel since 2001 and is the developer of the just::thread Pro extensions to the C++ 11 thread library.
concepts explained in this book
Memory ordering is the set of rules governing the permitted ordering and visibility of memory operations across concurrent execution contexts.
A synchronizes-with relation is an inter-thread ordering relationship in which a synchronization operation establishes visibility of effects from one thread to another.
Sequential consistency is a memory model in which participating operations appear in a single total order that preserves each thread’s program order.
Modification order is the total order of modifications to a particular atomic object, consistent with the sequenced-before order of each participating thread.
A future is an abstraction representing an asynchronous computation’s result, which may become available later and may be pending or complete.
Fine-grained locking is a synchronization technique that protects smaller portions of shared state with separate locks, allowing independent portions to be accessed concurrently.
Acquire-release semantics are memory-ordering rules under which release operations make preceding effects visible to acquire operations that synchronize with them.
A race condition is a concurrency defect in which program behavior or results depend on the timing or ordering of interacting operations.