Skip to content

Commit 485ea47

Browse files
committed
doc: clarify sentence in event loop doc
Refs: nodejs#8370 (diff) PR-URL: nodejs#8400
1 parent 7e8d994 commit 485ea47

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

doc/topics/the-event-loop-timers-and-nexttick.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ order of operations.
3434
│ ┌──────────┴────────────┐ │ incoming: │
3535
│ │ poll │<─────┤ connections, │
3636
│ └──────────┬────────────┘ │ data, etc. │
37-
│ ┌──────────┴────────────┐ └───────────────┘
37+
│ ┌──────────┴────────────┐ └───────────────┘
3838
│ │ check │
3939
│ └──────────┬────────────┘
4040
│ ┌──────────┴────────────┐
4141
└──┤ close callbacks │
42-
└───────────────────────┘
42+
└───────────────────────┘
4343

4444
*note: each box will be referred to as a "phase" of the event loop.*
4545

@@ -69,11 +69,12 @@ actually uses - are those above._
6969

7070
* **timers**: this phase executes callbacks scheduled by `setTimeout()`
7171
and `setInterval()`.
72-
* **I/O callbacks**: most types of callback except timers, `setImmediate()`, close
73-
* **idle, prepare**: only used internally
74-
* **poll**: retrieve new I/O events; node will block here when appropriate
75-
* **check**: `setImmediate()` callbacks are invoked here
76-
* **close callbacks**: e.g socket.on('close', ...)
72+
* **I/O callbacks**: executes almost all callbacks with the exception of
73+
close callbacks, the ones scheduled by timers, and `setImmediate()`.
74+
* **idle, prepare**: only used internally.
75+
* **poll**: retrieve new I/O events; node will block here when appropriate.
76+
* **check**: `setImmediate()` callbacks are invoked here.
77+
* **close callbacks**: e.g. `socket.on('close', ...)`.
7778

7879
Between each run of the event loop, Node.js checks if it is waiting for
7980
any asynchronous I/O or timers and shuts down cleanly if there are not

0 commit comments

Comments
 (0)