flâneur

A Design Space Exploration of Async/Await

cel.cs.brown.edu · 1,185 words · saved by 1 readers

Every language pitches async/await as synchronous-looking code, and the same two keywords appear everywhere. But behind the shared syntax hide nine independent design decisions, and no two of seven modern runtimes agree on what even the simplest async programs should do! In this paper we map the design space of async/await so you can find out where your language stands.

Many programming languages now provide the async/await keywords for expressing concurrency. The design rationale is pretty consistent: to make concurrent programs look more like straight-line code (see: Python, Rust, or Swift). We therefore describe the paradigm which encompasses async/await as straight-line asynchrony, as opposed to using event loops or callbacks. Language designs for straight-line asynchrony have been brewing for over 15 years. In this project, we wanted to understand: how similar or different is async/await between languages? The short answer is a lot more different than…

saved by

related reading