~/talk

C++20’s Coroutines for Beginners

Talkat CppCon 2022 · 2022-09-11..09-16· [rust]
slides:none on file

Starts from plain functions and shows C++20 coroutines actually working: implements a generator wrapper type with promise_type, an iterator for range‑based for, a chat-like wrapper that exchanges strings, and a cooperative scheduler using std::list plus awaitable that pushes/resumes handles. Explains customization points like suspend_always/suspend_never and uses co_await/co_yield/co_return; demos compile with clang and GCC and produce the expected interleaved and scheduler output.

AI-written summary · about

  1. 0:00Start
  2. 1:42Overview Comparing Normal Functions To Cool Routines
  3. 6:04Cooperative Multitasking
  4. 8:01Interact with Core Routines
  5. 9:55Elements of a Core Routine in C Plus
  6. 10:06Wrapper Type
  7. 14:14Disclaimer
  8. 32:17While Loop
  9. 33:45Setup the Get Return Object
  10. 39:15Equal Operator
  11. 41:04Scheduling Multiple Tasks
  12. 44:36Function Schedule
  13. 46:48Scheduler
  14. 55:03Questions
  15. 59:56What Are the Requirements in Current Compile Implementation To Enable Heap Election
~/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.