Skip to main content

Posts

Showing posts with the label Event Loop Call Stack

Blocking VS Non Blocking Code

blocking-vs-non-blocking Overview of Blocking vs Non-Blocking | Node.js Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine. Edit on GitHub This overview covers the difference between blocking and non-blocking calls in Node.js. This overview will refer to the event loop and libuv but no prior knowledge of those topics is required. Readers are assumed to have a basic understanding of the JavaScript language and Node.js callback pattern . "I/O" refers primarily to interaction with the system's disk and network supported by libuv . Blocking is when the execution of additional JavaScript in the Node.js process must wait until a non-JavaScript operation completes. This happens because the event loop is unable to continue running JavaScript while a blocking operation is occurring. In Node.js, JavaScript that exhi