What is process.nextTick()

 setImmediate() and setTimeout() are based on the event loop. But process.nextTick() technically not part of the event loop. Instead, the nextTickQueue will be processed after the current operation completes, regardless of the current phase of the event loop.

Thus, any time you call process.nextTick() in a given phase, all callbacks passed to process.nextTick() will be resolved before the event loop continues.

Comments

Popular posts from this blog

Which node logger did you use in your project?

What is promise, promise.all and promise.race? How do you chain promises?