~/talk

How to start using coroutines

Talkat NDC TechTown 2021 · 2021-08-30..09-02· [c-and-cpp]
links:none on file
slides:none on file

C++20 coroutines are usable now but require plumbing: GCC 10, MSVC recent, Clang 8 (experimental) support the three keywords co_await/co_yield/co_return. Each coroutine return type must provide a promise type requires get_return_object initial_suspend final_suspend return_value unhandled_exception, awaiters need three methods, and frames live on the heap so destruction and destroy must be handled. A tiny library implements task, sync_wait and when_all, and a single‑threaded scheduler running three coroutines works, but integration, sync APIs and multithreading primitives remain manual work.

AI-written summary · about

  1. 0:00Intro
  2. 0:28Plan
  3. 1:43Motivation
  4. 3:38Theory
  5. 4:25Steps of invocation
  6. 5:38Promise type
  7. 8:22Taskind
  8. 25:00Summary
  9. 25:36Call a protein
  10. 30:51Recap
  11. 31:20SyncWeight
  12. 32:51Conclusion
  13. 33:58Rewriting the code
  14. 37:12Why it doesnt work
  15. 40:31How to use it
~/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.