diff options
author | Luigi Pinca <luigipinca@gmail.com> | 2016-09-03 11:43:27 +0200 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2016-09-09 09:18:59 -0700 |
commit | 88ed3d260e3f111a5a100a377af55317388fcea0 (patch) | |
tree | a0566e5d206b48dccefc31153e25326c5ca4f42f /doc | |
parent | 137b7cb67f4d6ff43bbc6bd60987793933c268e5 (diff) | |
download | android-node-v8-88ed3d260e3f111a5a100a377af55317388fcea0.tar.gz android-node-v8-88ed3d260e3f111a5a100a377af55317388fcea0.tar.bz2 android-node-v8-88ed3d260e3f111a5a100a377af55317388fcea0.zip |
doc: clarify sentence in event loop doc
Refs: https://github.com/nodejs/node/pull/8370#discussion-diff-77201863
PR-URL: https://github.com/nodejs/node/pull/8400
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/topics/the-event-loop-timers-and-nexttick.md | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/doc/topics/the-event-loop-timers-and-nexttick.md b/doc/topics/the-event-loop-timers-and-nexttick.md index 3c3b5143eb..e38dd00dea 100644 --- a/doc/topics/the-event-loop-timers-and-nexttick.md +++ b/doc/topics/the-event-loop-timers-and-nexttick.md @@ -34,12 +34,12 @@ order of operations. │ ┌──────────┴────────────┐ │ incoming: │ │ │ poll │<─────┤ connections, │ │ └──────────┬────────────┘ │ data, etc. │ - │ ┌──────────┴────────────┐ └───────────────┘ + │ ┌──────────┴────────────┐ └───────────────┘ │ │ check │ │ └──────────┬────────────┘ │ ┌──────────┴────────────┐ └──┤ close callbacks │ - └───────────────────────┘ + └───────────────────────┘ *note: each box will be referred to as a "phase" of the event loop.* @@ -69,11 +69,12 @@ actually uses - are those above._ * **timers**: this phase executes callbacks scheduled by `setTimeout()` and `setInterval()`. -* **I/O callbacks**: most types of callback except timers, `setImmediate()`, close -* **idle, prepare**: only used internally -* **poll**: retrieve new I/O events; node will block here when appropriate -* **check**: `setImmediate()` callbacks are invoked here -* **close callbacks**: e.g socket.on('close', ...) +* **I/O callbacks**: executes almost all callbacks with the exception of + close callbacks, the ones scheduled by timers, and `setImmediate()`. +* **idle, prepare**: only used internally. +* **poll**: retrieve new I/O events; node will block here when appropriate. +* **check**: `setImmediate()` callbacks are invoked here. +* **close callbacks**: e.g. `socket.on('close', ...)`. Between each run of the event loop, Node.js checks if it is waiting for any asynchronous I/O or timers and shuts down cleanly if there are not |