Demystify The Multi-threading in Node.JS
▻https://hackernoon.com/demystify-the-multi-threading-in-node-js-4ff07eae9abe?source=rss----3a81
Node.js, one of the popular programming languages for a web software engineer, has a drawback — by default it only runs on a single thread. By using a single thread, Node.js runs the #code by using a terminology called Event Loop.To understand how event loop works, I encourage you to read this official documentation. This terminology is essential to understand the performance issue in Node.JS.The Node.js Event Loop, Timers, and process.nextTick() | Node.jsTo give you a quick summary of how Event Loop works in Node.js, we could refer to this diagram below,If you look at this diagram, an issue could appear when you need to “pause and wait until all of this stuff is completed”. On this step, there are two kinds of output. First, the process is successfully executed and continue to the next step. (...)
#software-development #javascript #nodejs #backend-development