Differentiate between process.nextTick() and setImmediate()

Answer

process.nextTick() and setImmediate() are two functions of the Timers module
that allow the control of in executing the code in the event loop
but both differ in their execution and are executed at different phases.
setImmediate() takes a callback and adds it to the immediate event queue on the existing cycle of the event loop during the process.
nextTick() takes a callback and not adds it to the immediate event queue but waits till the event loop is completed.

All react js Questions

Ask your interview questions on react-js

Write Your comment or Questions if you want the answers on react-js from react-js Experts
Name* :
Email Id* :
Mob no* :
Question
Or
Comment* :
 





Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website. If you are using this website then its your own responsibility to understand the content of the website

--------- Tutorials ---