Blocking vs. Non-Blocking IO
Resources
- https://medium.com/coderscorner/tale-of-client-server-and-socket-a6ef54a74763
- https://www.geeksforgeeks.org/blocking-and-nonblocking-io-in-operating-system/
Blocking IO:
- Waits for operation to complete before returning control
- Simple to understand and program
- Can lead to inefficient resource use if not managed properly
Non-blocking IO:
- Returns control immediately, operation continues in the background
- More complex to program due to need for callbacks or polling
- Enables efficient resource use, especially in high-load scenarios