Chapter 1. Hello, world of concurrency in C++!
1.2.1. Using concurrency for separation of concerns
1.3. Concurrency and multithreading in C++
1.3.1. History of multithreading in C++
1.3.2. Concurrency support in the new standard
2.1.2. Waiting for a thread to complete
2.2. Passing arguments to a thread function
2.3. Transferring ownership of a thread
Chapter 3. Sharing data between threads
3.1. Problems with sharing data between threads
3.2. Protecting shared data with mutexes
3.2.2. Structuring code for protecting shared data
3.2.3. Spotting race conditions inherent in interfaces
3.2.4. Deadlock: the problem and a solution
3.2.5. Further guidelines for avoiding deadlock
3.2.6. Flexible locking with std::unique_lock
3.3. Alternative facilities for protecting shared data
3.3.1. Protecting shared data during initialization
Chapter 4. Synchronizing concurrent operations
4.1. Waiting for an event or other condition
4.1.1. Waiting for a condition with condition variables
4.1.2. Building a thread-safe queue with condition variables
4.2. Waiting for one-off events with futures
4.2.1. Returning values from background tasks
4.2.2. Associating a task with a future
4.3. Waiting with a time limit
4.4. Using synchronization of operations to simplify code
Chapter 5. The C++ memory model and operations on atomic types
5.1.1. Objects and memory locations
5.2. Atomic operations and types in C++
5.2.1. The standard atomic types
5.2.2. Operations on std::atomic_flag
5.2.3. Operations on std::atomic<bool>
5.2.4. Operations on std::atomic<T*>: pointer arithmetic
5.2.5. Operations on standard atomic integral types
5.3. Synchronizing operations and enforcing ordering
5.3.1. The synchronizes-with relationship
5.3.2. The happens-before relationship
5.3.3. Memory ordering for atomic operations
Chapter 6. Designing lock-based concurrent data structures
6.1. What does it mean to design for concurrency?
6.1.1. Guidelines for designing data structures for concurrency
6.2. Lock-based concurrent data structures
6.2.1. A thread-safe stack using locks
6.2.2. A thread-safe queue using locks and condition variables
6.2.3. A thread-safe queue using fine-grained locks and condition variables
6.3. Designing more complex lock-based data structures
Chapter 7. Designing lock-free concurrent data structures
7.1. Definitions and consequences
7.1.1. Types of nonblocking data structures
7.1.2. Lock-free data structures
7.2. Examples of lock-free data structures
7.2.1. Writing a thread-safe stack without locks
7.2.2. Stopping those pesky leaks: managing memory in lock-free data structures
7.2.3. Detecting nodes that can’t be reclaimed using hazard pointers
7.2.4. Detecting nodes in use with reference counting
7.3. Guidelines for writing lock-free data structures
7.3.1. Guideline: use std::memory_order_seq_cst for prototyping
7.3.2. Guideline: use a lock-free memory reclamation scheme
7.3.3. Guideline: watch out for the ABA problem
7.3.4. Guideline: identify busy-wait loops and help the other thread
Chapter 8. Designing concurrent code
8.1. Techniques for dividing work between threads
8.1.1. Dividing data between threads before processing begins
8.2. Factors affecting the performance of concurrent code
8.2.2. Data contention and cache ping-pong
8.3. Designing data structures for multithreaded performance
8.4. Additional considerations when designing for concurrency
8.4.1. Exception safety in parallel algorithms
8.4.2. Scalability and Amdahl’s law
8.5. Designing concurrent code in practice
8.5.1. A parallel implementation of std::for_each
Chapter 9. Advanced thread management
9.1.1. The simplest possible thread pool
9.1.2. Waiting for tasks submitted to a thread pool
9.1.3. Tasks that wait for other tasks
9.2.1. Launching and interrupting another thread
9.2.2. Detecting that a thread has been interrupted
9.2.3. Interrupting a condition variable wait
9.2.4. Interrupting a wait on std::condition_variable_any
Chapter 10. Testing and debugging multithreaded applications
10.1. Types of concurrency-related bugs
10.2. Techniques for locating concurrency-related bugs
10.2.1. Reviewing code to locate potential bugs
10.2.2. Locating concurrency-related bugs by testing
10.2.3. Designing for testability
10.2.4. Multithreaded testing techniques
A. Brief reference for some C++11 language features
A.4.1. constexpr and user-defined types
B. Brief comparison of concurrency libraries
C. A message-passing framework and complete ATM example
D. C++ Thread Library reference
D.1.1. std::chrono::duration class template
D.1.2. std::chrono::time_point class template
D.1.3. std::chrono::system_clock class
D.2. <condition_variable> header
D.3.1. std::atomic_xxx typedefs
D.3.2. ATOMIC_xxx_LOCK_FREE macros
D.3.4. std::memory_order enumeration
D.3.5. std::atomic_thread_fence function
D.3.6. std::atomic_signal_fence function
D.3.8. std::atomic class template
D.4.1. std::future class template
D.4.2. std::shared_future class template
D.4.3. std::packaged_task class template
D.5.2. std::recursive_mutex class
D.5.4. std::recursive_timed_mutex class
D.5.5. std::lock_guard class template
D.5.6. std::unique_lock class template
D.5.7. std::lock function template
D.6.1. std::ratio class template
D.6.2. std::ratio_add template alias
D.6.3. std::ratio_subtract template alias
D.6.4. std::ratio_multiply template alias
D.6.5. std::ratio_divide template alias
D.6.6. std::ratio_equal class template
D.6.7. std::ratio_not_equal class template
D.6.8. Std::Ratio_Less Class Template
D.6.9. std::ratio_greater class template
3.144.30.236