~/talk

Coroutine Patterns: Problems and Solutions Using Coroutines in a Modern Codebase

Talkat CppCon 2023 · on Thursday, 2023-10-05· at 09:00· Maple 3/4/5, 6700 North Gaylord Rockies Boulevard· [rust]
slides:none on file

Shows concrete coroutine pitfalls and fixes from a heavily coroutinized codebase using Folly: lazy tasks, executor propagation and sticky executors that avoid leaking scheduling, real lifetime bugs where member coroutines implicitly capture this, lambda and temporary-object lifetimes, and how unsafely using blocking waits leads to blocking_wait deadlocks. Recommends structured concurrency, ASan for hard cases, co_try and async scopes to capture exceptions, and an explicit async cleanup pattern for RAII where destructors cannot co_await.

AI-written summary · about

  1. 0:00Intro
  2. 1:00Agenda
  3. 1:24Motivation
  4. 3:47Tasks and Executors
  5. 6:25Executor
  6. 8:32Lifetime
  7. 9:54Game
  8. 14:27Keeping objects alive
  9. 16:07Scheduling the background
  10. 17:29ASN scope
  11. 18:01Exceptions
  12. 19:39Cleanup
  13. 23:07Synchronization
  14. 24:35Mutexes
  15. 26:13Coroutine Locks
  16. 27:35Conclusion
~/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.