introduced event loop in ides/event-loop-timers-and-nexttick/" rel=" nofollow noreferrer "> The Node.js Event Loop, Timers, and process.nextTick () article
The concept ofand its respective stages (phase)
- close callbacks
- check
- poll
- idle,prepare
- pending callbacks
- timers
combined with the schematic diagram given in the article
:
seems to express the opposite order of execution:
6 -> 5 -> 4 -> 3 -> 2-> 1
but because in the same iCompact cycle
// immediate timeout
$ node timeout_vs_immediate.js
immediate
timeout
$ node timeout_vs_immediate.js
immediate
timeout
so are these stages prioritized or not? If there is? What is right? Is there any conflict between the description and the icon in the document? (that is, I am concerned about English
Is there a problem with the understanding of? )