~/talk

Channels - An alternative to callbacks and futures

Talkat CppCon 2016 · 2016-09-18..09-23· [concurrency, c-and-cpp]
links:none on file
slides:none on file

Channels implemented as a C++ library using the Coroutines TS plus Boost.Fiber and Boost.Futures replace one-off futures with a streaming primitive that achieves zero dynamic allocations after setup, interoperates with threads and coroutines, and supports select (when_any) across channels. Microbenchmarks show simple channel sends run in the same ballpark as callbacks and roughly 6x faster than futures; the implemented select is about twice as slow as raw callbacks but ~50% faster than Go’s select. An ordered-parallel processor using pooled buffers works lock‑free and without allocations while running.

AI-written summary · about

  1. 0:00Introduction and background
  2. 2:06Asynchronous programming models
  3. 5:05Limitations of callbacks and futures
  4. 7:18Performance comparison
  5. 8:41Go channels and Boost.Fiber
  6. 10:07Designing C++ channels
  7. 13:40Coroutines and channels
  8. 18:14Channel implementation details
  9. 21:09Adding an executor
  10. 22:58Performance results
  11. 23:18Channel select and when-any
  12. 25:46Why not futures for streams
  13. 26:31Select implementation
  14. 30:06Select range and selection
  15. 33:24Channel select performance
  16. 34:27Additional channel features
  17. 34:49Example: ordered output with channels
  18. 36:57Processor and reader implementation
  19. 38:23Writer and reordering logic
  20. 41:16Thread interoperability
  21. 42:19Summary and future work
  22. 43:24Q&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.