Threads vs Coroutines — Why C++ Has Two Concurrency Models - Conor Spilsbury - CppCon 2025
https://cppcon.org --- Threads vs Coroutines — Why C++ Has Two Concurrency Models - Conor Spilsbury - CppCon 2025 --- 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. --- Slides: https://github.com/CppCon/CppCon2025/... Work at Hudson River Trading (HRT): https://tinyurl.com/safxfctf --- Conor Spilsbury Conor Spilsbury is a Senior Software Engineer at Bloomberg, where he works on the Listed Securities’ Execution Management System (EMSX). EMSX is a high-performance, high-throughput multi-asset trading solution. Conor is also the chair of Bloomberg's C++ Guild. He holds a master’s degree in mathematics from the University of Exeter. --- CppCon is the annual, week-long face-to-face gathering for the entire C++ community. The conference is organized by the C++ community for the community. You will enjoy inspirational talks and a friendly atmosphere designed to help attendees learn from each other, meet interesting people, and generally have a stimulating experience. Taking place this year in Aurora, Colorado, near the Denver airport, and including multiple diverse tracks, the conference will appeal to anyone from C++ novices to experts. Annual CppCon Conference - https://www.cppcon.org / cppcon https://x.com/cppcon / cppconference / cppcon https://mastodon.social/@CppCon --- Videos Filmed & Edited by Bash Films: http://www.BashFilms.com YouTube Channel Managed by Digital Medium Ltd: https://events.digital-medium.co.uk --- #cpp #cplusplus #cppcon #cppprogramming #cplusplusprogramming #softwaredevelopment #softwareengineering #coding #code #computerscience #technology #technews #programming #programmer

Back to Basics: C++ Concepts - Jeff Garland - CppCon 2025

Interesting Upcoming Low-Latency, Concurrency, and Parallelism Features - CppCon 2025

The Cost of Concurrency Coordination with Jon Gjengset

Back to Basics: Master the static, inline, const, and constexpr C++ Keywords - Andreas Fertig

Workshop Preview Safe and Efficient C++ for Embedded Environments

How Netflix Uses Java - 2026 Edition

Matt Godbolt: Advanced Skylake Deep Dive

Why ML Needs a New Programming Language with Chris Lattner

Back to Basics: Custom Allocators Explained - From Basics to Advanced - Kevin Carpenter - CppCon

TypeScript, C# and Turbo Pascal with Anders Hejlsberg

Lazy and Fast: Ranges Meet Parallelism in C++ - Daniel Anderson - CppCon 2025

Back to Basics: Concurrency - Arthur O'Dwyer - CppCon 2020

The Only Unbreakable Law

"Simple Made Easy" - Rich Hickey (2011)

Concept-based Generic Programming - Bjarne Stroustrup - CppCon 2025

Back to Basics: C++ Ranges - Mike Shah - CppCon 2025

Compiler Explorer: The Features You Never Knew Existed - Matt Godbolt - CppCon 2025

Why Testing Is Hard and How to Fix It with Will Wilson

Choose the Right C++ Parallelism Tool | Low-Level vs Async vs Coroutines vs Data Parallel

