Explain the difference between process.tick() and setImmediate() ?

devquora
devquora

Posted On: May 05, 2021

 

setImmediate() method is used to invoke its callback function is placed in the check phase whereas setImmediate() method is called in the poll phase.

The process.nextTick() method is used to add the callback function at the start of the next event queue, it is called for the first time before the event loop is processed. process.nextTick(callback);

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    Node JS Interview Questions with Express

    What is Node js ?

    Node Js is one of the most popular and powerful server technologies today. It allows you built the entire website only..

    Node JS Interview Questions with Express

    Explain CLI in Node.js?

    CLI stands for Command Line Interface. It is a utility or program on your computer where users type commands to perform..

    Node JS Interview Questions with Express

    In which Language Node Js is written ?

    Node js is written in C, C++,JavaScript.It uses Google’s open source V8 Javascript Engine to convert Javascript code..