Solution for How does the poll phase not block in Nodejs event loop?
is Given Below:
Reading the docs, i came across this part
Since any of these operations may schedule more operations and new
events processed in the poll phase are queued by the kernel, poll
events can be queued while polling events are being processed. As a
result, long running callbacks can allow the poll phase to run much
longer than a timer’s threshold. See the timers and poll sections for
But if poll events keep adding to the queue while processing other events, how does this phase finish? I mean there could be thousands of events that need be processed.
Or maybe i just misunderstood the docs?