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

block_on and spawn_blocking are tokio's async abstractions, there is no "blocking code's abstraction" that can leak.

What the article intentionally omits is that I can defer io by getting a handler and polling it in a select loop. And right after that, I can also poll my mpsc queue if I want to. This is how "blocking code" has worked for the last few decades.



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

Search: