~/talk

Coroutine Intuition in C++

Talkat C++ on Sea 2023 · 2023-06-28..06-30· [c-and-cpp]
links:none on file
slides:none on file

Coroutines in C++20 are functions that suspend and resume using stackless frames and promises; examples include a Fibonacci generator implemented as a lazy range, async IO awaitables that register OS callbacks, and task continuations that form linked-list continuations for composition. Resuming a live coroutine costs about a virtual call, while frame allocation can be expensive. Patterns include schedulers with batching and priority, thread-to-thread resumption, and massive concurrency; anti-patterns are simple dispatch loops and ad-hoc state-splitting. Libraries like cppcoro, asio and unifex provide usable implementations.

AI-written summary · about

  1. 0:00Introduction
  2. 1:05C++20 coroutines overview
  3. 7:49History of coroutines
  4. 13:26Stackful vs stackless
  5. 17:40Core components
  6. 24:22Generators
  7. 26:28Composition and continuations
  8. 29:35Async I/O
  9. 31:46Massive concurrency
  10. 35:00Scheduling techniques
  11. 38:05Execution environments
  12. 39:52Task graphs
  13. 43:02Pitfalls
  14. 50:50Summary
~/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.