Embedded Asynchronous Abstraction C++ - Implementing Senders & Receivers Without an OS
summary
Argues that P2300-style senders/receivers can run on freestanding embedded MCUs with no OS, exceptions, or heap by mapping interrupts to schedulers (timer and priority), using intrusive lists for statically allocated tasks and non-movable operation state to hold receivers. Implements tag_invoke-based connect/start, sender adapters (then, let_value/sequence), when_all/when_any, and an allocation strategy that returns an optional stop_source for start_detached. Demonstrates cooperative cancellation via propagated stop_tokens and shows examples (blinky, timer-driven tasks, prioritized ISRs) that work without dynamic allocation.
AI-written summary · about
chapters (12)
- 0:00Introduction and goals
- 2:22Embedded development
- 11:28Execution contexts
- 15:02Sender basics
- 19:46Operation states
- 23:46Timer scheduler
- 36:01Priority scheduler
- 43:59Sender adapters
- 51:58Monadic operations
- 1:10:00Wait operations
- 1:13:50Errors and cancellation
- 1:24:25Allocation and conclusion
related talks
01h 24mEasy Senders/Receivers
17mGetting Started with Senders and Receivers in C++ Programming
01h 01mStructured Networking
01h 31mTowards Async Everything Part 1 - Senders as the Lowest Layer
01h 11mAsynchronous C++
05mModern C++ in Embedded OS Dev
50mExtending std::execution Further - Higher-Order Senders and the Shape of Asynchronous Programs
01h 31mTowards Async Everything Part 2 - Scopes, Construction, and Destruction
