~/talk

Deciphering Coroutines - a visual approach

Talkat Meeting C++ 2022 · 2022-11-17..11-19· [frontend-architecture]
slides:none on file

Sustainable introduction to C++20 coroutines that builds a cheat sheet of diagrams and minimal working code, showing how the compiler creates the return object, how the promise type, awaitable (await_ready/await_suspend/await_resume) and coroutine_handle connect, how to pass data both directions, how co_yield maps to yield_value, and that coroutines are stackless with initial_suspend/final_suspend. Examples compile, demonstrate resume and destroy semantics, symmetric transfer, and allocator customization via operator new, so the mechanisms and practical patterns are visible and reproducible.

AI-written summary · about

  1. 0:00Intro
  2. 2:50Agenda
  3. 3:38Disclaimer
  4. 4:20Basics
  5. 7:00Async
  6. 10:03Suspended execution
  7. 10:58Generator example
  8. 12:50Generator object
  9. 14:14Interface
  10. 14:49Return type
  11. 16:14Core routine
  12. 17:02Core routine example
  13. 24:03Print statement
  14. 25:04Pause function
  15. 25:16awaitable
  16. 28:05suspension
  17. 29:37quarantine
  18. 30:42suspend always
  19. 34:01cheat sheet
  20. 36:45awaitables
  21. 38:04resuming core routines
  22. 38:21resume example
  23. 39:09the problem
  24. 42:12first connection
  25. 42:36await suspend
  26. 42:55recap
  27. 44:06essential examples
  28. 44:22await
  29. 45:45for caller
  30. 46:08getanswer
  31. 46:23controlflow
  32. 46:36the other way
  33. 46:47the caller side
  34. 48:56the quarantine
  35. 49:09the await suspend
  36. 50:16return value
  37. 50:59yield
  38. 51:59yield value
  39. 53:10customer waitable
  40. 53:33symmetric transfer
  41. 54:27Symmetrical transfer
  42. 56:10Summary
  43. 56:35Learning the syntax
  44. 57:21Cheatsheet
  45. 58:00Questions
~/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.