Coroutines and C++ DSLs for Human Scale Concurrency
summary
Claim: C++ stackless coroutines (available in Visual Studio 2015 and coming to clang/llvm) can be metaprogrammed into higher‑level concurrency constructs. Tools used: coroutine TS implementation, promise/await API and heavy template/macros to build a small experimental DSL called dein DSL with actor‑like flasks, message queues, protocols and selective receive. Result: working prototype that enforces protocol handlers at compile time, suffers limited debugger/tooling support, and targets very high density (design goal: billions of coroutines), but remains experimental.
AI-written summary · about
chapters (23)
- 0:00Start
- 0:24Introduction
- 3:12Google Scale Concurrency
- 4:46Can Concurrent Programs Be Correct by Construction
- 5:56Race Condition
- 8:08Spatial Transition Diagrams
- 10:53Kill Safety
- 14:45Atomic Queues
- 23:04Alternate Futures
- 23:51The Reactive Model
- 25:20Lorenz Attractor
- 41:54Why Dsl
- 44:16Overview
- 45:41Message Queues
- 46:36Examples
- 52:43A Hierarchical State Chart
- 54:13Parallel Composition
- 57:25Exceptions
- 1:01:18Protocol Definition
- 1:05:21Hierarchical Parallel Composition
- 1:13:37Signals
- 1:18:05Debugging Support
- 1:26:13Design Goals
related talks
48m“Coroutines: what can't they do?”
01h 16mConcurrency Approaches: Past, Present, and Future
01h 30mC++ Coroutines and Structured Concurrency in Practice
58m“Introduction to C++ Coroutines"
01h 05m“Concurrency, Parallelism and Coroutines”
48mStructured Concurrency: Writing Safer Concurrent Code with Coroutines...
52mCoroutines: C++ vs Rust
41mCoroutines explained by example
