When Do I Need To Use Process.nexttick In Node.js For Best Practice Async Functions?
So I've been wondering if I need to wrap things that take time in a process.nextTick or not. For example, imagine a function that returns a promise for a xml string translated to a
Solution 1:
u can get the same thing with setTimeout(function(){//},0); It just places ur function in queue instead of stack ,mostly put to make ur code non-blocking kinda
ref these links for deeper understanding
http://howtonode.org/understanding-process-next-tick
Post a Comment for "When Do I Need To Use Process.nexttick In Node.js For Best Practice Async Functions?"