From 183ba322bb114f0261829600c398f1528a4e0d1a Mon Sep 17 00:00:00 2001 From: Kevin Donahue Date: Sat, 21 May 2016 11:19:36 -0400 Subject: [PATCH 1/2] doc: fix typos in event loop doc to aid readability Typos in the `setTimeout` vs. `setImmediate` section were hindering readability. Fixed these typos. --- doc/topics/the-event-loop-timers-and-nexttick.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/topics/the-event-loop-timers-and-nexttick.md b/doc/topics/the-event-loop-timers-and-nexttick.md index 2955b9adb54f18..05d5b319f67d09 100644 --- a/doc/topics/the-event-loop-timers-and-nexttick.md +++ b/doc/topics/the-event-loop-timers-and-nexttick.md @@ -218,10 +218,10 @@ ways depending on when they are called. * `setTimeout()` schedules a script to be run after a minimum threshold in ms has elapsed. -The order in which they are execute varies depending on the context in -which they are called. If both are called in the main module then you -are bound to how fast your process go, which is impacted by other -programs running on your machine. +The order in which they are executed varies depending on the context in +which they are called. If both are called in the main module, then you +are bound by how fast your process goes (which is impacted by other +programs running on your machine). For example, if we run the following script which is not within a I/O cycle (i.e. the main module), the order in which the two functions are From 83a6f226b6a768793cac7a9e8eccd49cc8e8a847 Mon Sep 17 00:00:00 2001 From: Kevin Donahue Date: Mon, 23 May 2016 19:56:58 -0400 Subject: [PATCH 2/2] doc: remove possessive language from `setImmediate` vs `setTimeout` Use 'the process' instead of 'your process'. --- .../the-event-loop-timers-and-nexttick.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/doc/topics/the-event-loop-timers-and-nexttick.md b/doc/topics/the-event-loop-timers-and-nexttick.md index 05d5b319f67d09..0876edeab4244b 100644 --- a/doc/topics/the-event-loop-timers-and-nexttick.md +++ b/doc/topics/the-event-loop-timers-and-nexttick.md @@ -218,15 +218,15 @@ ways depending on when they are called. * `setTimeout()` schedules a script to be run after a minimum threshold in ms has elapsed. -The order in which they are executed varies depending on the context in -which they are called. If both are called in the main module, then you -are bound by how fast your process goes (which is impacted by other -programs running on your machine). - -For example, if we run the following script which is not within a I/O -cycle (i.e. the main module), the order in which the two functions are -executed is non-deterministic as it is based upon how fast your process -goes (which is impacted by other programs running on your machine): +The order in which the timers are executed will vary depending on the +context in which they are called. If both are called from within the +main module, then timing will be bound by the performance of the process +(which can be impacted by other applications running on the machine). + +For example, if we run the following script which is not within an I/O +cycle (i.e. the main module), the order in which the two timers are +executed is non-deterministic, as it is bound by the performance of the +process: ```js