What is an event loop in simple terms? And why do they talk about certain turns of the event cycle? They say there is a process.nextTick () function in node.js for creating an asynchronous function, but what exactly does it mean and how does it work?

  • A nice article on the topic: frontender.info/understanding-the-node-js-event-loop - user207618
  • one
    No, I'm sorry, the second wall of the text won't be enough for me today, but I already described the essence to you in the first one. - D-side
  • All programs are essentially while(true) ДелатьЧтоТо - this is the main application loop that handles all events. nextTick interrupts the execution of the current synchronous operation and transmits the time to another, for example. a huge for loop without asynchronous calls, until it is completed to the end, will stop all other operations if you do not call nextTick . This does not apply to asynchronous operations - everything is ok with them. Here's a video if you don’t like the text, youtu.be/w4EHA9xqoNw - Aikon Mogwai

0