Towards Async Everything Part 1 - Senders as the Lowest Layer
summary
Argues that senders can be the lowest I/O layer by implementing async read_some directly on io_uring with std::execution primitives, showing a working design that submits SQEs, matches CQEs, and handles cancellation via io_uring_op_async_cancel. Builds an IOURingContext with an intrusive atomic linked list of waiters, an eventfd doorbell, a scheduler that runs a run loop calling io_uring_enter, and an externally_completed sender factory to glue kernel completions to receivers. Demonstrates edge cases (null SQE, inline vs deferred completion, CQE lifetime) and a practical, functioning implementation.
AI-written summary · about
chapters (22)
- 0:00Introduction
- 3:31Senders and receivers analogy
- 8:27Synchronous to async reads
- 10:13IO uring for async syscalls
- 13:01File descriptors with IO uring
- 17:34Blocking in async pipelines
- 22:29Sync vs async continuations
- 26:00Receivers as continuations
- 28:06Externally completed algorithm
- 31:36Wait for SQE with references
- 35:25Inline completion and zero-cost
- 36:29Consume SQE with senders
- 38:57Cancel async operations
- 40:43Structured concurrency
- 43:50Completing by value
- 47:18Thread safety and scheduler
- 51:11Run scheduled operations
- 55:00IO uring context run
- 1:00:55Completion and submission queues
- 1:03:43Run scheduled operations detail
- 1:11:21Senders lowest layer
- 1:21:49Q&A
related talks
01h 11mAsynchronous C++
50mExtending std::execution Further - Higher-Order Senders and the Shape of Asynchronous Programs
01h 32mEmbedded Asynchronous Abstraction C++ - Implementing Senders & Receivers Without an OS
01h 24mEasy Senders/Receivers
17mGetting Started with Senders and Receivers in C++ Programming
57mAsynchronous I/O and coroutines for smooth data streaming
01h 32mKeynote: Employing Senders & Receivers to Tame Concurrency in C++ Embedded Systems
01h 01mStructured Networking
