A CppCon 2025 talk by Conor Spilsbury (Bloomberg) explaining why C++ has two concurrency models: threads and coroutines. The talk walks through the scaling limits of raw threads (context switching overhead, over-subscription), how thread pools partially address this, and why event loops and cooperative scheduling via coroutines are better suited for IO-bound workloads. Key concepts covered include parallelism vs. concurrency, preemptive vs. cooperative scheduling, stackless coroutine frames, and how C++20 coroutines allow writing non-blocking code in a linear style. The talk also touches on CPU-bound vs. IO-bound work tradeoffs, and previews C++26 std::execution for composing mixed workloads.

51m watch time

Sort: