CppCon 2025 Threads vs Coroutines: Why C++ Has Two Concurrency Models -- Conor Spilsbury

Threads_vs_coroutines_Conor_Spilsbury.pngRegistration is now open for CppCon 2026! The conference starts on September 12 and will be held in person in Aurora, CO. To whet your appetite for this year’s conference, we’re posting videos of some of the top-rated talks from last year's conference. Here’s another CppCon talk video we hope you will enjoy – and why not register today for CppCon 2026!

Threads vs Coroutines: Why C++ Has Two Concurrency Models

by Conor Spilsbury

Summary of the talk:

The C++11 standard introduced a powerful set of tools for concurrency such as threads, mutexes, condition variables, and futures. More recently, C++20 introduced another powerful but fundamentally different concurrency abstraction in the form of coroutines. But coroutines are not just an evolution or a replacement for threads. Instead, they each solve different problems in different ways. Choosing the right tool for the job requires understanding how each works under the hood and where they shine. This talk will help build that intuition by looking at how each interacts with the operating system and hardware which will help make better decisions when choosing which to use.

We'll explore how threads and synchronization primitives work at the operating-system and hardware level, from thread creation and scheduling to where context switching and synchronization introduce performance costs. We’ll then contrast this to the coroutine model introduced in C++20 which takes a fundamentally different approach by using a cooperative model based on the suspension and resumption of work.

Given this understanding, we’ll finish by applying this intuition to a set of real-world scenarios to identify whether threads or coroutines are a better fit for the problem at hand.

Add a Comment

Comments are closed.

Comments (0)

There are currently no comments on this entry.