ycliper

Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

Интересные видео

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
Скачать

Ultimate Guide to Node.js Event Loop | Event Loop Detailed Explanation with Code Example

node js

node js tutorial

event loop node js

event loop javascript

event loop in js

node.js

node.js tutorial

node.js tutorial in hindi

event driven

event driven architecture

event driven programming

loop in node

event loop in node js

settimeout in node

settimeout in node js example

setimmediate

setimmediate vs settimeout vs process.nexttick

setimmediate vs process.nexttick

promises in node js

async javascript

event loop

asynchronous javascript

Автор: opendevs

Загружено: 2023-04-23

Просмотров: 820

Описание: Codebase for this lesson: https://github.com/opendevs-org/nodej...

How to Install Node.js: https://github.com/opendevs-org/nodej...

The Node.js event loop allows Node.js to perform non-blocking I/O operations by offloading operations to the system kernel whenever possible. 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.

When Node.js starts, it initializes the event loop, processes the provided input script which may make async API calls, schedule timers, or call process.nextTick(), then begins processing the event loop.

Each phase of the event loop has a FIFO queue of callbacks to execute (timer have sorted heap). When the event loop enters a given phase, it will perform any operations specific to that phase, then execute callbacks in that phase's queue until the queue has been exhausted or the maximum number of callbacks has executed.

The different phases of the event loop include:
**timers**: this phase executes callbacks scheduled by setTimeout() and setInterval().
**I/O callbacks**: executes I/O callbacks deferred to the next loop iteration.
**poll**: retrieve new I/O events; execute I/O related callbacks; node will block here when appropriate.
**check**: setImmediate() callbacks are invoked here.
**close callbacks**: some close callbacks, e.g. socket.on('close', ...).

After each phase, Node.js has an internal event loop which resolves all the process.nextTick() callbacks and another smaller event loop which executes resolved promises' then() callbacks i.e Promise.resolve().then() callbacks.

====== Development guides ======
VS Code setup: https://code.visualstudio.com/learn/g...
Node.js setup: https://nodejs.org/en/download/

====== opendevs Links ======
opendevs website: https://opendevs.in
Contact us: https://opendevs.in/contact

Our website offers React, Redux, Node.js course with practice problems & code submissions. Meanwhile, we are working on bringing even more features like: code reviews, interviews, exclusive & bonus sessions, TA support, 1 on 1 mentorship, etc. as soon as possible. It's all free in BETA stage, so please check it out!

#nodejs #nodejstutorial #eventloopnodejs #eventloopjavascript #eventloopinjs #nodejs #node.jstutorial #node.jstutorialinhindi #eventdriven #eventdrivenarchitecture #eventdrivenprogramming #eventloopinnodejs #settimeoutinnode #settimeoutinnodejsexample #setimmediate #setimmediate vs #settimeout vs #process.nexttick #setimmediateinnodejs, #setimmediate vs #process.nexttick, #node.js #install, #promisesinnodejs

Не удается загрузить Youtube-плеер. Проверьте блокировку Youtube в вашей сети.
Повторяем попытку...
Ultimate Guide to Node.js Event Loop | Event Loop Detailed Explanation with Code Example

Поделиться в:

Доступные форматы для скачивания:

Скачать видео

  • Информация по загрузке:

Скачать аудио

Похожие видео

© 2025 ycliper. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: [email protected]