@@ -34,12 +34,12 @@ order of operations.
34
34
β ββββββββββββ΄βββββββββββββ β incoming: β
35
35
β β poll β<ββββββ€ connections, β
36
36
β ββββββββββββ¬βββββββββββββ β data, etc. β
37
- β ββββββββββββ΄βββββββββββββ βββββββββββββββββ
37
+ β ββββββββββββ΄βββββββββββββ βββββββββββββββββ
38
38
β β check β
39
39
β ββββββββββββ¬βββββββββββββ
40
40
β ββββββββββββ΄βββββββββββββ
41
41
ββββ€ close callbacks β
42
- βββββββββββββββββββββββββ
42
+ βββββββββββββββββββββββββ
43
43
44
44
* note: each box will be referred to as a "phase" of the event loop.*
45
45
@@ -69,11 +69,12 @@ actually uses - are those above._
69
69
70
70
* ** timers** : this phase executes callbacks scheduled by ` setTimeout() `
71
71
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', ...) ` .
77
78
78
79
Between each run of the event loop, Node.js checks if it is waiting for
79
80
any asynchronous I/O or timers and shuts down cleanly if there are not
0 commit comments