~/talk

Manage Asynchronous Control Flow With C++ Coroutines

Talkat ACCU 2025 · 2025-04-01..04-04· [c-and-cpp]
slides:none on file

Shows how to implement an async/await-style Task type for C++20 coroutines by explicitly linking coroutine promises and handles, using symmetric transfer to swap call-stack frames, a resume-caller awaitable in final_suspend to wake the caller, and a simple scheduler registration to pump IO completions. Demonstrates initial_suspend to defer body execution, propagating execution context through promises, and a spawn_task pattern that returns the final result — a working approach that reconstructs nested async call stacks.

AI-written summary · about

  1. 0:00Introduction
  2. 1:11Coroutine basics recap
  3. 9:22Focus on async IO
  4. 13:31Coroutines vs green threads
  5. 22:24Stackless coroutine challenges
  6. 32:14Call stack mechanics
  7. 38:11Building call stacks
  8. 43:54Resuming outer coroutines
  9. 53:37Waking inner coroutines
  10. 1:01:03Execution context propagation
  11. 1:08:57Initial suspend and transfer
  12. 1:14:38Spawning coroutines
  13. 1:20:59Final result handling
  14. 1:23:33Coroutines as data
  15. 1:26:43Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.