Blocking vs Async I/O
Discussions debate the effects of synchronous blocking I/O on processes and performance, contrasting it with non-blocking and asynchronous I/O models in contexts like networking, servers, Rust, and Node.js.
Activity Over Time
Top Contributors
Keywords
Sample Comments
What happens when something blocks for synchronous I/O?
Asking out of ignorance: won't a synchronous API block the entire process while the I/O is going on?
No isn't. You can perform synchronus actions. A lot of the io functions have a blocking version.
I think they meant that there is never blocking I/O
Only if you are sticking to synchronous IO. With nonblocking and async IO it gets much more complicated.
That's non blocking, not async as in the async that rust is developing.
Probably any IO heavy workload, which usually requires async if it should be performant (like in all other programming languages too).
So don't use async. You can get a very, very long way with threads and good old fashioned blocking I/O.
You said that this was in the context of async I/O.
They aren't async by nature, just time consuming. Async is a useful way of dealing with time consuming operations in some situations, but blocking calls also a work (and make more sense for some workloads.)