Node.js · Junior · Question 31 of 75
What does 'non-blocking I/O' mean in Node.js?
- ✓Correct answer: Node.js starts an I/O operation and continues running other code; a callback or promise handles the result later
- 2I/O operations are always faster than in other languages
- 3Files are read only when the process exits
Explanation
While a file is being read or a database is answering, the main thread can serve other requests. Blocking calls like fs.readFileSync stop everything until they finish.