If Writing C++ Coroutines Goes Over My Head, Where Do I Even Begin with Debugging?
summary
Covers concrete debugging patterns: sets breakpoints on coroutine customization points (get_return_object, initial_suspend, final_suspend) and steps a homemade suspendable subroutine to show where values land and exceptions propagate; demonstrates std::generator quirks including std::generator heap allocation and the rvalue-reference string iterator that disappears on second read; builds a timeout runner on Nvidia’s senders/receivers runtime and shows a deadlock/livelock caused by parallel forward progress (4-thread pool) and how freezing threads in the debugger reproduces the failure.
AI-written summary · about
chapters (12)
- 0:00Introduction
- 4:16Top-down coroutines
- 11:11Standard generator primer
- 23:16Concurrency vs parallelism
- 26:40Task coroutines
- 39:05Monadic coroutines
- 48:22Debugging coroutines
- 1:00:08Suspendable subroutine
- 1:08:49Debugging generators
- 1:16:19Forward progress issues
- 1:25:40Debugging examples
- 1:28:14Q&A
related talks
01h 01mBack to Basics: Debugging in Cpp
01h 23mImplementing a C++ Coroutine Task from Scratch
44mA Guide to Debugging C++ Code: Practical and Interactive Examples
01h 14mHow to Use C++20 Coroutines for Networking
01h 26mC++ Coroutines - Don’t Try This at Home
57mCoroutine Intuition in C++
01h 16mC++ Coroutines From Scratch
52mNobody Can Program Correctly - Lessons From 20 Years of Debugging C++ Code
