~/talk

Coroutines: C++ vs Rust

Talkat ACCU 2022 · 2022-04-06..04-09· [c-and-cpp, rust]
links:none on file
slides:none on file

Compares C++ coroutines using a user-defined promise type and std::coroutine_handle (compiler allocates a heap state by default, with optional elision) against Rust’s compiler-generated Future trait types driven by a waker and executor. Shows a working timer awaitable in C++ that resumes the innermost coroutine bottom‑up, contrasts Rust’s top‑down poll/wake model, explains pinning vs implicit heap allocation, and demonstrates the tail‑call / double‑destroy bugs and how continuations and final_suspend handle them.

AI-written summary · about

  1. 0:00Start
  2. 4:42Main Loop
  3. 10:52Protein Handle
  4. 14:20User Interface
  5. 20:42Compiler Transformation
  6. 24:47Recap
  7. 27:14Variables and Resumers
  8. 51:49Common Operations
  9. 53:23Obligatory Socket Example
  10. 55:51Curtin Allocation
  11. 56:35Stackful Proteins
~/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.