Skip to content

Tag: setimmediate

setImmediate vs. nextTick

Node.js version 0.10 was released today and introduced setImmediate. The API changes documentation suggests using it when doing recursive nextTick calls. From what MDN says it seems very similar to process.nextTick. When should I use nextTick and when should I use setImmediate? Answer Use setImmediate if you want to queue the function behind whatever I/O event callbacks that are already