C++ Concurrency in Action: Practical Multithreading
by Anthony Williams

Table of Contents

  1. Hello, world of concurrency in C++!
    1. What is Concurrency?
    2. Why Use Concurrency?
    3. Concurrency and Multithreading in C++
    4. Getting Started
  2. Managing threads
    1. Basic thread managment
    2. Passing arguments to a thread function
    3. Transferring ownership of a thread
    4. Choosing the number of threads at runtime
    5. Identifying threads
  3. Sharing data between threads
    1. Problems with sharing data between threads
    2. Protecting shared data with mutexes
    3. Alternative facilities for protecting shared data
  4. Synchronizing concurrent operations
    1. Waiting for an event or other condition
    2. Waiting for one-off events with futures
    3. Waiting with a time limit
    4. Using synchronization of operations to simplify code
  5. The C++ memory model and operations on atomic types
    1. Memory model basics
    2. Atomic operations and types in C++
    3. Synchronizing operations and enforcing ordering
  6. Designing lock-based concurrent data structures
    1. What does it mean to design for concurrency?
    2. Lock-based concurrent data structures
    3. Designing more complex lock-based data structures
  7. Designing lock-free concurrent data structures
    1. Definitions and consequences
    2. Examples of lock-free data structures
    3. Guidelines for writing lock-free data structures
  8. Designing concurrent code
    1. Techniques for dividing work between threads
    2. Factors affecting the performance of concurrent code
    3. Designing data structures for multithreaded performance
    4. Additional considerations when designing for concurrency
    5. Designing concurrent code in practice
  9. Advanced thread management
    1. Thread pools
    2. Interrupting Threads
  10. Parallel algorithms
    1. Parallelizing the standard library algorithms
    2. Execution policies
    3. The parallel algorithms from the C++ Standard Library
  11. Testing and debugging multithreaded applications
    1. Types of concurrency-related bugs
    2. Techniques for locating concurrency-related bugs
  1. Brief reference for some C++11 language features
  2. Brief comparison of concurrency libraries
  3. A message-passing framework and complete ATM example
  4. C++ Thread Library reference