#14 setImmediate() vs setTimeout() vs process.nextTick() | NodeJS Bootcamp
Автор: CodeSapiens
Загружено: 10 окт. 2023 г.
Просмотров: 3 436 просмотров
What is the order of execution of setTimeout, setImmediate, process.nextTick?
To answer this let’s understand EventLoop.
What is the Event Loop?
The event loop is what allows Node.js to perform non-blocking I/O operations — despite the fact that JavaScript is single-threaded — by offloading operations to the system kernel whenever possible.
Since most modern kernels are multi-threaded, they can handle multiple operations executing in the background. When one of these operations completes, the kernel tells Node.js so that the appropriate callback may be added to the poll queue to eventually be executed.
Use our code - CODESAPIENS to get 30% Off on BacktoBackSWE, one of the best platforms for interview preparation 💯 https://backtobackswe.com/checkout?plan=li...

Доступные форматы для скачивания:
Скачать видео mp4
-
Информация по загрузке: