Node.js event loop

The JavaScript event loop takes the first call in the callback queue and adds it to the call stack as soon as it’s empty.

JavaScript code is being run in a run-to-completion manner, meaning that if the call stack is currently executing some code, the event loop is blocked and won’t add any calls from the queue until the stack is empty again.

https://felixgerschau.com/javascript-event-loop-call-stack/

Leave a comment