logoalt Hacker News

Salgattoday at 5:48 PM0 repliesview on HN

The whole point of async/await (besides allowing synchronous style code instead of callbacks) is that it lets you yield the thread efficiently back to the executor (OS threads have a massive overhead in comparison). And if you're doing something that blocks the thread instead of yielding it, you can choose between either spawn_blocking or a thread pool.