zlacker

[parent] [thread] 0 comments
1. fshbbd+(OP)[view] [source] 2024-01-20 02:11:25
A common usecase for async is if you are implementing a web service with an API. Suppose your API uses Spotify’s API. Your server can handle many requests at once. It would be nice if all of them can call Spotify’s API at the same time without each holding a thread. Tokio tasks have much lower overhead than OS threads. Your N requests can all await at once and it doesn’t take N threads to do it.
[go to top]