Hacker News new | ask | show | jobs
by Nullabillity 1373 days ago
async/await is just syntactic sugar for futures/promises. The future API itself generally lends itself towards structured concurrency, but your particular implementation may not be.

For example, Rust's `Future` is structured (although executors may introduce escape hatches), while JavaScript's `Promise` is unstructured.

1 comments

Can you explain a little how Rust adds cancellation and retry supervision using future? I'm not familiar with Rust.