~/talk

What We’ve Been Awaiting For? - How to Build a C++ Coroutine Type

Talkat C++Now 2024 · 2024-04-29..05-03· [compilers-and-language-design]
slides:none on file

Shows how to build a concrete C++ coroutine type that actually downloads web pages using libcurl multi API, implements a tiny scheduler that tracks running vs blocked coroutine counts, and exposes promise-style combinators (all/any/race) plus retries and optional results. Code materializes lazy ranges to start all fetches, stores results in the promise frame, and resumes coroutines from the multi-handle loop; the demo fetches pages, extracts URLs with CTRE, downloads resources, and the system successfully joins and returns the vector of contents.

AI-written summary · about

  1. 0:00Introduction
  2. 1:05JavaScript coroutines
  3. 5:06C++ coroutines motivation
  4. 8:03C++ coroutine basics
  5. 13:07Coroutine mechanics
  6. 22:26Suspension points
  7. 25:42Promise type
  8. 31:47Coroutine resumption
  9. 35:21Scheduler integration
  10. 41:40Lazy perform implementation
  11. 44:10libcurl async API
  12. 45:37Fetch function
  13. 47:29Promise composition
  14. 51:20Search engine demo
  15. 53:44Library overview
  16. 54:05Q&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.