From fd1a48c9c95d0b1860302c251fe6eeec41b78d3b Mon Sep 17 00:00:00 2001 From: Dan Koster Date: Sun, 16 Oct 2016 22:07:49 -0700 Subject: [PATCH] doc: minor fixes event-loop-timers-and-nexttick.md Minor fixes and enhancements to event-loop-timers-and-nexttick.md Added missing "be" Added a link to REPL docs Added definition of libuv and a link PR-URL: https://github.com/nodejs/node/pull/9126 Reviewed-By: Luigi Pinca Reviewed-By: James M Snell --- doc/topics/the-event-loop-timers-and-nexttick.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/doc/topics/the-event-loop-timers-and-nexttick.md b/doc/topics/the-event-loop-timers-and-nexttick.md index 1f2456a17c..03a886af01 100644 --- a/doc/topics/the-event-loop-timers-and-nexttick.md +++ b/doc/topics/the-event-loop-timers-and-nexttick.md @@ -9,13 +9,13 @@ offloading operations to the system kernel whenever possible. Since most modern kernels are multi-threaded, they can handle multiple operations executing in the background. When one of these operations completes, the kernel tells Node.js so that the appropriate callback -may added to the **poll** queue to eventually be executed. We'll explain +may be added to the **poll** queue to eventually be executed. We'll explain this in further detail later in this topic. ## Event Loop Explained When Node.js starts, it initializes the event loop, processes the -provided input script (or drops into the REPL, which is not covered in +provided input script (or drops into the [REPL][], which is not covered in this document) which may make async API calls, schedule timers, or call `process.nextTick()`, then begins processing the event loop. @@ -141,7 +141,9 @@ the timer's callback. In this example, you will see that the total delay between the timer being scheduled and its callback being executed will be 105ms. -Note: To prevent the **poll** phase from starving the event loop, libuv +Note: To prevent the **poll** phase from starving the event loop, [libuv] +(http://libuv.org/) (the C library that implements the Node.js +event loop and all of the asynchronous behaviors of the platform) also has a hard maximum (system dependent) before it stops polling for more events. @@ -473,3 +475,5 @@ myEmitter.on('event', function() { console.log('an event occurred!'); }); ``` + +[REPL]: https://nodejs.org/api/repl.html#repl_repl