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

But that's where non-blocking leads; it can't block until it reads all the bytes you asked for, that has to be handled somehow.

A fancy C library could buffer the partial read for you rather than you needing to do it, and it could even maybe deal with turning your function into the state machine required to resume the function at the partial read.

But then you look around and realise you've created another async/await.



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

Search: