Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

What do you mean by this? Async/await provides a standard way to handle message passing between threads, a cleaner syntax than nested callbacks and a lot of other niceties over raw threading.

Async/await is in many single and multi-threaded languages so I'm not clear on what you're saying.



What I mean is: async/await is just syntactic sugar over promises/futures and those just buy you a way to schedule future computation. The js runtimes schedule all your code on a single thread. It's the fact your code only runs on a single thread that 'solves concurrency' because data races can't happen if one thread of code is allowed to access memory at a time.

You can set up the same limitation in a threaded program/language, and people have (see vert.x, clojure STM, and others).


If you are using threads you wouldn't use nested callbacks in the first place.

In a proper threaded model you can use exactly the same syntax that you would use with async/await (futures, future combinators, message passing what have you) except you do not have to randomly annotate your code with awaits.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: