Powerful Data Processing Pipelines with C++20 Coroutines
summary
Shows a concrete pipeline implementation: file source -> zlib deflate filter -> sink using C++20 coroutines, ring buffers and a simple acquire/commit API. Includes a threaded version (mutex + condition_variable) and a coroutine single-threaded version that uses symmetric transfer (await_suspend returns a coroutine handle) to swap stages without a global scheduler. Slides contain runnable but non-production code and examples of surprising wins: symmetric transfer makes cooperative, per-stage scheduling trivial.
AI-written summary · about
chapters (28)
- 0:00Start
- 0:10About me - Andreas Weis (he/him)
- 1:37Motivation - Design Goals
- 2:31Overview
- 3:16Warning! Dangerous slide code ahead!
- 3:41Anatomy of a pipeline
- 4:52A universal interface for processing steps
- 5:58The zlib interface
- 6:41C++ filter interface
- 8:14Example: File Source
- 9:36Example: Identity Filter
- 10:45Example: Deflate Filter
- 14:12Connecting multiple stages through buffers
- 17:06Acquired Buffer Interface
- 18:37Connecting steps with buffers
- 27:54Thread safe Ring Buffer access
- 33:28Recap: Control Flow
- 35:23Coroutine Basics - User View
- 36:10Coroutine Basics - Asynchronous computation
- 39:06Coroutine Basics - Suspend/resume
- 41:16Participants in coroutine execution
- 42:18Return object
- 44:59Promise Type
- 47:45Awaitable
- 49:10Minimum boilerplate
- 52:39Suspension
- 54:14Making acquainances
- 58:47Getting data out of a coroutine
related talks
57mAsynchronous I/O and coroutines for smooth data streaming
01h 16mC++ Coroutines From Scratch
01h 30mC++ Coroutines and Structured Concurrency in Practice
01h 03mContemporary C++ in action
01h 00mThe Pipes Library: How Plumbing Can Make Your Code More Expressive
01h 08mThinking Outside the Synchronisation Quadrant
01h 06mC++ Coroutines from scratch
01h 16mC++ Feature Coroutines, Beginner Friendly
