Hacker News new | ask | show | jobs
by bigstrat2003 1 day ago
> You use async to preserve system resources. For example you can easily exhaust the host with ~20k connections running a thread-per-connection schema...

Sure, if you need to run 20k connections then use async. But the fact of the matter is that the vast majority of software is not going to take on 20k connections. Those people (i.e the majority of software devs) should use threads, because they are much easier to reason about and work with.

1 comments

async gives you a few other advantages, it allows you to handle bi-streams much easier than two sync threads especially when it comes to synchronization.