What is the difference between process.nextTick() and setImmediate() ?Aliza
The difference between
setImmediate() is that
process.nextTick() defers the execution of action till the next pass around the event loop or it simply calls the callback function once the ongoing execution of the event loop is finished whereas
setImmediate() executes a callback on the next cycle of the event loop and it gives back to the event loop for executing any I/O operations.