~/talk

An Introduction to C++ Coroutines

Talkat Meeting C++ 2015 · 2015-12-04..12-05· [rust]
links:none on file
slides:none on file

Proposal shows concrete semantics and a working VC++ prototype: compiler creates a heap-allocated coroutine frame via operator new, uses a promise type and coroutine_handle to resume, and implements await by calling await_ready / await_suspend / await_resume. Examples convert a synchronous TCP reader to asynchronous, adapt std::future via coroutine_traits and nonmember awaitables, and build a generator using suspend_always/suspend_never. Implementation ships in a Visual C++ update but wording and keywords remain evolving.

AI-written summary · about

  1. 0:00Start
  2. 8:49What is a Coroutine?
  3. 10:19What makes a function a coroutine?
  4. 12:12What does co await actually do?
  5. 14:14The simplest awaitable: suspend always
  6. 14:52Another simple awaitable: suspend never
  7. 15:26So that's the first half...
  8. 15:43What happens when you invoke a function?
  9. 16:08What happens when you invoke a coroutine?
  10. 25:49Returning from a Coroutine
  11. 26:24What's in a Promise?
  12. 29:20Coroutine Lifetime
  13. 32:44Let's look at future...
  14. 33:57coroutine_traits
  15. 43:43Subroutines and Coroutines
  16. 45:00Coroutine Control Flow
  17. 45:36Design Principles
~/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.