Debugging C++ Coroutines
summary
Walks through concrete debugging cases: implements a minimal suspendable subroutine and a Fibonacci std::generator example, inspects disassembly and promise callbacks, and reproduces a lifetime bug when generators yield heap-allocated vectors (sanitizers catch the access violation). Uses Visual Studio stepping, static thread pool and a scheduler from Nvidia/XAsync P2300 senders/receivers, shows that std::generator is not truly asynchronous and that std::task missed C++26. Demonstrates exception propagation (missing try/catch crashes) and scheduler affinity causing a timeout task never to run.
AI-written summary · about
