Экраны

Grill/grills/:id

Перейти к содержимому

Node.js runtime internals · round 3

Разбор идёт

10 ответов из 15 · 10 оценено

В06/ 15

Т04Timers and scheduling

A timer set for 100 ms fires at 340 ms. List the possible causes, most likely first.

Ваш ответ на этой странице25 нояб. 2026 г.

Most likely the loop was busy: a long synchronous task or a burst of promise jobs, so the timers phase came late. Next, a garbage collection pause. A major collection can take tens of milliseconds. Then CPU starvation: a throttled container or a noisy neighbour. Last, my own code re-armed the timer.

уверенный ответ

Держит нагрузку.

25 нояб. 2026 г.

Right order, and you named the mechanism each time. To reach level 4, add that timers are checked once per loop iteration, so a slow poll phase delays them too.