News for hackers. Stuff that matters.
Re:Async and Await in Rust: a full proposal by imtringued on Sunday July 15, 2018 @05:54PM (#17537302)
That just sounds like the API wasn't designed to support async/await rather than an inherent limitation. Something like Promise.all [1] is all you need to wait for multiple promises if the API had a way to accept a promise instead of a synchronous callback.

[1] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

Re:Async and Await in Rust: a full proposal by maxxxxx on Sunday July 15, 2018 @06:27PM (#17537436)
The same problem would happen with a promise. In a desktop the user clicks "Quit". If you now have to call an async function the Quit handler will return and somewhen later the await portion of the code gets called. From the Quit handler you can't tell when the await stuff has finished so there is no clear time when you can shut down the app.

In a browser on or server side it's different.