Coroutines: C++ vs Rust

Coroutines: C++ vs Rust

11:00 - 12:30 Friday 8th April 2022 BST

Advanced

C and Rust are both system programming languages that recently received support for asynchronous programming using coroutines. Given the memory and time constraints, both languages opted for stackless coroutines implemented by a compiler-generated state machine. However, beyond that the designs are very different: in C the awaitables continue a coroutine from the bottom up, whereas in Rust a waker polls a future from the top down.

We’ll figure out what this means by exploring how C++ and Rust coroutines work, what sets them apart, and what the trade-offs are. If you like programming language design, this talk is for you.

image

Jonathan Müller

Jonathan is a Computer Science graduate student. In his spare time he works on various C open-source libraries for memory allocation, cache-friendly containers or parsing. He also blogs about C and library development at foonathan.net.





Your Privacy

By clicking "Accept Non-Essential Cookies" you agree ACCU can store non-essential cookies on your device and disclose information in accordance with our Privacy Policy and Cookie Policy.

Current Setting: Non-Essential Cookies REJECTED


By clicking "Include Third Party Content" you agree ACCU can forward your IP address to third-party sites (such as YouTube) to enhance the information presented on this site, and that third-party sites may store cookies on your device.

Current Setting: Third Party Content EXCLUDED



Settings can be changed at any time from the Cookie Policy page.