Asynchronous I/O and coroutines for smooth data streaming
summary
Linux kernel io_uring + userland pipeline of C++20 coroutines turn UDP packet handling into chained single-thread loops that avoid callback hell. The demo submits four preposted reads per socket, reduces syscalls from thousands with poll/read to about 5,265 system calls for 20,000 packets (roughly one in four), trades a few lost packets for much lower overhead, and exposes real costs: custom promise/awaitable types, tricky error handling and cancellation, but functional end-to-end.
AI-written summary · about
chapters (12)
- 0:00Introduction
- 9:00Uring IO
- 13:45Multithreaded IO
- 14:35Better performance
- 20:00Coroutines
- 21:39Coroutine returns
- 25:39Promise type
- 30:05Coroutine
- 34:59Filter
- 38:19Recap
- 45:15Undefined behavior
- 50:16Resources
related talks
01h 04mAsynchronous I/O and Coroutines for Smooth Data Streaming
06mZero-copy Transfers with io_uring and Rust
01h 27mPowerful Data Processing Pipelines with C++20 Coroutines
01h 31mHistory of Time: Asynchronous C++
59mThe Wild West of post-POSIX IO Interfaces
01h 01mStructured Networking
58m“C++ Coroutines - a negative overhead abstraction"
46mRevamping ioctl with io_uring
