Skip to content

Commit e4608c8

Browse files
flaviocopesZYSzys
authored andcommitted
fix: Correct name, not event queue but message queue. (nodejs#128)
1 parent 5763a04 commit e4608c8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • src/documentation/0029-node-event-loop

src/documentation/0029-node-event-loop/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ When setTimeout() is called, the Browser or Node.js start the timer. Once the ti
144144

145145
The Message Queue is also where user-initiated events like click or keyboard events, or fetch responses are queued before your code has the opportunity to react to them. Or also DOM events like `onLoad`.
146146

147-
**The loop gives priority to the call stack, and it first processes everything it finds in the call stack, and once there's nothing in there, it goes to pick up things in the event queue.**
147+
**The loop gives priority to the call stack, and it first processes everything it finds in the call stack, and once there's nothing in there, it goes to pick up things in the message queue.**
148148

149149
We don't have to wait for functions like `setTimeout`, fetch or other things to do their own work, because they are provided by the browser, and they live on their own threads. For example, if you set the `setTimeout` timeout to 2 seconds, you don't have to wait 2 seconds - the wait happens elsewhere.
150150

0 commit comments

Comments
 (0)