Node.js - Event Loop

Node.js - Event Loop

memorize.aimemorize.ai (lvl 286)
Section 1

Preview this deck

idle, prepare

Front

Star 0%
Star 0%
Star 0%
Star 0%
Star 0%

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Active users

0

All-time users

0

Favorites

0

Last updated

7 years ago

Date created

Mar 1, 2020

Cards (8)

Section 1

(8 cards)

idle, prepare

Front

Event Loop Phase: This phase is only used internally.

Back

poll

Front

Event Loop Phase: This phase will retrieve new I/O events; Execute I/O related callbacks (almost all with the exception of close callbacks, the ones scheduled by timers, and setImmediate()); Node will block here when appropriate.

Back

First-In, First-Out (FIFO)

Front

Each phase has a _____ queue of callbacks to execute.

Back

check

Front

Event Loop Phase: setImmediate() callbacks are invoked during this phase.

Back

phase

Front

Each step/section in the event loop

Back

timers

Front

Event Loop Phase: This phase executes callbacks scheduled by setTimeout() and setInterval().

Back

pending callbacks

Front

Event Loop Phase: This phase executes I/O callbacks deferred to the next loop iteration.

Back

close callbacks

Front

Event Loop Phase: During this phase all on('close') event callbacks are processed.

Back