What is Event Loop?

Technology CommunityCategory: Node.jsWhat is Event Loop?
VietMX Staff asked 3 years ago

Node.js is a single threaded application but it support concurrency via concept of event and callbacks. As every API of Node js are asynchronous and being a single thread, it uses async function calls to maintain the concurrency. Node uses observer pattern. Node thread keeps an event loop and whenever any task get completed, it fires the corresponding event which signals the event listener function to get executed.