| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 87f0083 commit 9c3f4d6
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -9,13 +9,13 @@ offloading operations to the system kernel whenever possible. | |||
| 9 | 9 | Since most modern kernels are multi-threaded, they can handle multiple | |
| 10 | 10 | operations executing in the background. When one of these operations | |
| 11 | 11 | completes, the kernel tells Node.js so that the appropriate callback | |
| 12 | - may added to the **poll** queue to eventually be executed. We'll explain | ||
| 12 | + may be added to the **poll** queue to eventually be executed. We'll explain | ||
| 13 | 13 | this in further detail later in this topic. | |
| 14 | 14 | ||
| 15 | 15 | ## Event Loop Explained | |
| 16 | 16 | ||
| 17 | 17 | When Node.js starts, it initializes the event loop, processes the | |
| 18 | - provided input script (or drops into the REPL, which is not covered in | ||
| 18 | + provided input script (or drops into the [REPL][], which is not covered in | ||
| 19 | 19 | this document) which may make async API calls, schedule timers, or call | |
| 20 | 20 | `process.nextTick()`, then begins processing the event loop. | |
| 21 | 21 | ||
@@ -144,7 +144,9 @@ the timer's callback. In this example, you will see that the total delay | |||
| 144 | 144 | between the timer being scheduled and its callback being executed will | |
| 145 | 145 | be 105ms. | |
| 146 | 146 | ||
| 147 | - Note: To prevent the **poll** phase from starving the event loop, libuv | ||
| 147 | + Note: To prevent the **poll** phase from starving the event loop, [libuv] | ||
| 148 | + (http://libuv.org/) (the C library that implements the Node.js | ||
| 149 | + event loop and all of the asynchronous behaviors of the platform) | ||
| 148 | 150 | also has a hard maximum (system dependent) before it stops polling for | |
| 149 | 151 | more events. | |
| 150 | 152 | ||
@@ -480,3 +482,5 @@ myEmitter.on('event', function() { | |||
| 480 | 482 | console.log('an event occurred!'); | |
| 481 | 483 | }); | |
| 482 | 484 | ``` | |
| 485 | + | ||
| 486 | + [REPL]: https://nodejs.org/api/repl.html#repl_repl | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments