Добавить
Уведомления

#14 setImmediate() vs setTimeout() vs process.nextTick() | NodeJS Bootcamp

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=lifetime-legacy&discount_code=CODESAPIENS

Иконка канала Кодерские идеи
63 подписчика
12+
16 просмотров
2 года назад
12+
16 просмотров
2 года назад

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=lifetime-legacy&discount_code=CODESAPIENS

, чтобы оставлять комментарии