Back To Schedule

Towards Async Everything Part 2

Scopes, Construction, and Destruction

16:30 - 18:00 Monday 4th May 2026 MT Flug Auditorium
Advanced
Concurrency

Asynchronous I/O in C++ has traditionally focused on performing operations such as reads and writes, while the acquisition and release of resources remain fundamentally synchronous. This mismatch becomes increasingly problematic as lower-level mechanisms, such as io_uring, make even the close syscall asynchronous.

While asynchronous functions are well supported by std::execution, C++’s object model remains rooted in synchronous construction and destruction: Constructors and destructors cannot suspend. This raises a fundamental question: How can the deterministic cleanup central to modern C++ be expressed when it may require asynchronous work?

This talk explores a model for asynchronous lifetime management based on scopes. By representing entry and exit as composable asynchronous operations, construction and destruction can be expressed within the same framework as other asynchronous work. The result is a unified approach to resource management, enabling objects whose lifetimes are fully asynchronous while preserving the structure and guarantees of RAII.

View Slides

Robert Leahy

Core DeveloperHudson River Trading

Robert is a graduate of the University of Victoria where he specialized in graphics, gaming, and digital geometry processing. After spending 4.5 years in full stack web development he pivoted to financial infrastructure in late 2016 whereafter he spent nearly nine years at a start up working on next generation financial market data storage and retrieval mechanisms. In 2019 he became involved in the ISO C++ committee with a particular focus on library evolution. Since summer 2025 he has worked as a core developer at Hudson River Trading.