You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In node.cc immediately after LoadEnvironment() in Start()it jumps to:
more = uv_run(env->event_loop(), UV_RUN_ONCE);
I understand why it's UV_RUN_ONCE on each iteration of the loop, not why it starts that way. I imagine there are some default events that happen no matter what the first time through, could someone enlighten me as to what those are (that stop node from just blocking forever)?
Possibly -- I guess I'm confused why process._getActiveHandles() returns an empty array right before it enters this initial uv_run (causing me to believe that uv_run would block forever). Do ticks not count as handles in this sense?
Activity
sam-github commentedon Aug 20, 2015
there are a number of calls to process.nextTick in src/node.js, is that what you are looking for?
tolmasky commentedon Aug 20, 2015
Possibly -- I guess I'm confused why process._getActiveHandles() returns an empty array right before it enters this initial uv_run (causing me to believe that uv_run would block forever). Do ticks not count as handles in this sense?
bnoordhuis commentedon Aug 20, 2015
They're backed by a
uv_idle_thandle that is not visible to JS land. Grep src/node.cc forimmediate_idle_handle.Fishrock123 commentedon Aug 25, 2015
Closing, @tolmasky let us know if you have more questions. :)