<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: rukotanafreddy250</title>
    <description>The latest articles on DEV Community by rukotanafreddy250 (@rukotanafreddy250).</description>
    <link>https://dev.to/rukotanafreddy250</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F322579%2Fc8daeb8d-249f-43f2-97c0-85ebd432fd47.png</url>
      <title>DEV Community: rukotanafreddy250</title>
      <link>https://dev.to/rukotanafreddy250</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rukotanafreddy250"/>
    <language>en</language>
    <item>
      <title>My understanding of an event loop in Nodejs</title>
      <dc:creator>rukotanafreddy250</dc:creator>
      <pubDate>Thu, 23 Jan 2020 16:25:56 +0000</pubDate>
      <link>https://dev.to/rukotanafreddy250/my-understanding-of-an-event-loop-in-nodejs-4fjc</link>
      <guid>https://dev.to/rukotanafreddy250/my-understanding-of-an-event-loop-in-nodejs-4fjc</guid>
      <description>&lt;h2&gt;
  
  
  What is the Event Loop?
&lt;/h2&gt;

&lt;p&gt;The event loop is what allows Nodejs to perform non-blocking I/O operations — despite the fact that JavaScript is single-threaded — by offloading operations to the system kernel whenever possible.&lt;/p&gt;

&lt;h3&gt;
  
  
  Event loop explained
&lt;/h3&gt;

&lt;p&gt;When Node.js starts, it initializes the event loop, processes the provided input script which may make async API calls, schedule timers, or call process.nextTick(), then begins processing the event loop.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ZUjxZY3t--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/13sco2y5lyecfpoptslw.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZUjxZY3t--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/13sco2y5lyecfpoptslw.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;this diagram shows how event loop order of operations&lt;/p&gt;

&lt;p&gt;Each phase has a FIFO queue of callbacks to execute. When the queue has been exhausted or the callback limit is reached, the event loop will move to the next phase, and so on.&lt;/p&gt;

</description>
      <category>node</category>
    </item>
  </channel>
</rss>
