Deciphering C++ Coroutines Part 2 - Mastering Asynchronous Control Flow - Andreas Weis - CppCon 2024 @CppCon
Deciphering C++ Coroutines Part 2 - Mastering Asynchronous Control Flow - Andreas Weis - CppCon 2024  @CppCon
Uploaded March 2025 | Updated September 2026, 2 weeks ago
https://cppcon.org​
---

Deciphering C++ Coroutines Part 2 - Mastering Asynchronous Control Flow - Andreas Weis - CppCon 2024
---

One of the most powerful applications of coroutines is in the context of asynchronous operations, where their use allows for significant simplifactions of application code. Unfortunately, building an asynchronous library interface to enable such benefits for applications is not exactly straightforward in C++.

In this talk we will explore the essentials of managing asynchronous control flow with coroutines. We will discover how to reconstruct the call stack of nested asynchronous calls and thus bridge a significant gap between C++'s stackless coroutines and the stackful coroutines from other languages. We will learn how to build a mechanism similar to the async/await from languages like Python or Javascript for our own libraries. And we will explore how we can perform arbitrary manipulations of the call stack in such an environment to unleash the full power of C++'s coroutine mechanism.

At the end of this talk we will have a proper understanding of how the Task<>type found in many coroutine libraries works and how it can be used to manage asynchronous operations. This will serve as an important building block for understanding more advanced mechanisms, like the sender/receiver mechanism proposed for C++26.

This talk assumes basic familiarity with the components of the C++ coroutines language feature: promises, awaitables, coroutine handles, and passing data in and out of coroutines.

This is the second part in an ongoing series of talks about C++20 coroutines.
---

Slides: github.com/CppCon/CppCon2024/blob/main/Presentations/Deciphering_Cpp_Coroutines.pdf

Sponsored by JetBrains: jetbrains.com/clion
---

Andreas Weis

Andreas Weis has been writing C++ code in many different domains, from real-time graphics, to distributed applications, to embedded systems. As a library writer by nature, he enjoys writing portable code and exposing complex functionalities through simple, richly-typed interfaces. Both of which C++ allows him to do extensively.
Andreas is also one of the co-organizers of the Munich C++ User Group, which allows him to share this passion with others on a regular basis.
---

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 - cppcon.org
linkedin.com/company/cppcon
https://x.com/cppcon
facebook.com/CppConference
reddit.com/r/cppcon
https://mastodon.social/@CppCon
---

Videos Filmed & Edited by Bash Films: BashFilms.com
YouTube Channel Managed by Digital Medium Ltd: events.digital-medium.co.uk
---

#cpp #cplusplus #cppcon #cppprogramming #cplusplusprogramming #softwaredevelopment #softwareengineering #coding #code #computerscience #technology #technews #programming #programmer
Deciphering C++ Coroutines Part 2 - Mastering Asynchronous Control Flow - Andreas Weis - CppCon 2024Lightning Talk: From Macro to Micro in C++ - Conor Spilsbury - CppCon 2024A Pragmatic Approach to C++: Designing, Organizing and Writing Maintainable Code - Oleg RabaevLightning Talk: How Fast Isn’t You Constexpr? - Hossein GhahramanzadehAnigh - CppCon 2025Lightning Talk: Proof Searching in DepC - Raffaele Rossi - CppCon 2025Why 99% of C++ Microbenchmarks Lie – and How to Write the 1% that Matter! - Kris JusiakBack to Basics: Move Semantics - Ben Saks - CppCon 2025Lightning Talk: Trust Nothing, Complain About Something, Want Everything - Jonathan Stein - CppConWhy Every C++ Game Developer Should Learn SDL 3 Now - Mike Shah - CppCon 2025Threads vs Coroutines — Why C++ Has Two Concurrency Models - Conor Spilsbury - CppCon 2025Lightning Talk: The Type Safe Builder Pattern for C++ - John Stracke - CppCon 2025Lightning Talk: Promote Modern C++ Usage With Coding Questions Part 2 - Zhenchao Lin - CppCon 2025
CppCon |

Deciphering C++ Coroutines Part 2 - Mastering Asynchronous Control Flow - Andreas Weis - CppCon 2024

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER