Skip to content
loading...

re: Understanding the Node.js event loop phases and how it executes the JavaScript code. VIEW POST

TOP OF THREAD FULL DISCUSSION
re: I think because process.nextTick is in fs.readFile block, so when event loop comes to poll phase, it has to wait for i/o task is completed before e...
 

Okay ! Did not read the code carefully that's y d confusion . Thanks a lot :)

Hey! Pardon for the late reply. As trunghahaha said, process.nextTick is wrapped inside the fs.readFile, hence, the event loop gets to know about it only when the callback of fs.readFile is executed, right? Hence, such behaviour.

code of conduct - report abuse