| A Design Space Exploration of Async/Await(cel.cs.brown.edu) | |
| 371 points by wcrichton 3 days ago | 99 comments | |
tl;dr: Async/await semantics vary wildly across languages: a simple fire-and-forget program produces four different outputs across seven runtimes (Asyncio, C#, JavaScript, Tokio, Smol, Trio, Swift), with no two runtimes agreeing on three variations of the program. The authors' paper identifies nine design dimensions (e.g., Eagerness, Extent, Destruction, Cancellation behavior) that explain the divergence, and formalizes them in a core calculus that traces exactly which design choices lead to which observable behaviors. | |
HN Discussion:
| |