I\'m having trouble understanding exactly how process.nextTick does its thing. I thought I understood, but I can\'t seem to replicate how I feel this should wor
process.nextTick put the callback on the next tick that is going to be executed, not at the end of the tick queue.
Node.js doc (http://nodejs.org/api/process.html#process_process_nexttick_callback) say: "It typically runs before any other I/O events fire, but there are some exceptions."
setTimeout(callback, 0) will probably work more like you describe.