About node js event loop..

Asked 2 years ago, Updated 2 years ago, 66 views

Could you briefly explain the event loop of node js? The concept is a little confusing.

Can the processing order of various processes in the event loop be different regardless of the order in which they came in?

node.js mongodb

2022-09-22 10:41

1 Answers

An event loop is a loop that monitors an IO or timer event and calls callbacks that want the event.

Therefore, callbacks registered in the event loop have events that each person is waiting for (File IO, Network IO, Timer event), so callbacks are executed in the order in which the events occur, not in the order in which they are registered.


2022-09-22 10:41

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.