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?
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 hugefor
loop without asynchronous calls, until it is completed to the end, will stop all other operations if you do not callnextTick
. 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