Copyright
Brief Table of Contents
Table of Contents
Preface
Acknowledgments
About This Book
About the Cover Illustration
Chapter 1. Hello, world of concurrency in C++!
1.1. What is concurrency?
1.1.1. Concurrency in computer systems
1.1.2. Approaches to concurrency
1.2. Why use concurrency?
1.2.1. Using concurrency for separation of concerns
1.2.2. Using concurrency for performance
1.2.3. When not to use concurrency
1.3. Concurrency and multithreading in C++
1.3.1. History of multithreading in C++
1.3.2. Concurrency support in the new standard
1.3.3. Efficiency in the C++ Thread Library
1.3.4. Platform-specific facilities
1.4. Getting started
1.4.1. Hello, Concurrent World
1.5. Summary
Chapter 2. Managing threads
2.1. Basic thread management
2.1.1. Launching a thread
2.1.2. Waiting for a thread to complete
2.1.3. Waiting in exceptional circumstances
2.1.4. Running threads in the background
2.2. Passing arguments to a thread function
2.3. Transferring ownership of a thread
2.4. Choosing the number of threads at runtime
2.5. Identifying threads
2.6. Summary
Chapter 3. Sharing data between threads
3.1. Problems with sharing data between threads
3.1.1. Race conditions
3.1.2. Avoiding problematic race conditions
3.2. Protecting shared data with mutexes
3.2.1. Using mutexes in C++
3.2.2. Structuring code for protecting shared data