๐Ÿงต C++ Concurrency and Parallelism
Home Chapters Examples Diagrams Bibliography GitHub โ†—
  1. Home
  2. Correctness, Errors, and Debugging
Part 7 4 chapters

Correctness, Errors, and Debugging

Error versus exception handling, debugging real races and deadlocks, sanitizers, and observing concurrency in production.

Doc 26

Error Handling vs Exception Handling

Error codes versus exceptions, std::expected as a middle ground, propagating errors across thread, future, and coroutine boundaries, and exception safety under concurrency.

16 minRead โ†’
Doc 27

Debugging Real Races and Deadlocks

Reproducing an actual data race and an actual deadlock, driving gdb against a multithreaded program, and reading a ThreadSanitizer report line by line.

17 minRead โ†’
Doc 28

Sanitizers and Dynamic Analysis

ThreadSanitizer and AddressSanitizer, Valgrind's Helgrind and DRD, what each tool catches and misses, and wiring them into CI.

16 minRead โ†’
Doc 29

Observing Concurrency

Instrumenting a concurrent C++ service with OpenTelemetry, propagating trace context across thread-pool, future, and coroutine boundaries, and the saturation and contention metrics that reveal a struggling pool before it becomes an incident.

17 minRead โ†’
โ† Previous part Communications and Concurrency Next part โ†’ Practice: Design, Containers, and a Full Example
C++ Concurrency and Parallelism
Tutorial content: CC BY 4.0. Sample code: Apache 2.0.
Source on GitHub โ†—  ยท  File an issue โ†—