I have come across the term blocking read, but I don't know what it means. I've tried googling but can't find an answer.
I'm guessing it means read from a stream in blocks rather than in lines or characters.
I have come across the term blocking read, but I don't know what it means. I've tried googling but can't find an answer.
I'm guessing it means read from a stream in blocks rather than in lines or characters.
No you are wrong, keep googling
Basically, it's a read operation that waits for input (or at least first sees if the input buffer/stream has data to process and does so) and returns only when data has been processed. A non-blocking read will get whatever happens to be in said input buffer/stream and immediately returns (even if there is nothing at all to be processed).
Consider: Asynchronous I/O - Wikipedia, the free encyclopedia
"Owners of dogs will have noticed that, if you provide them with food and water and shelter and affection, they will think you are god. Whereas owners of cats are compelled to realize that, if you provide them with food and water and shelter and affection, they draw the conclusion that they are gods."
-Christopher Hitchens