https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick/#event-loop-explainedPhases Overview
timers: this phase executes callbacks scheduled by setTimeout() and setInterval().
pending callbacks: executes I/O callbacks deferred to the next loop iteration.
idle, prepare: only used internally.
poll: 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.
check: setImmediate() callbacks are invoked here.
close callbacks: some close callbacks, e.g. socket.on('close', ...).
【 在 dylen (大海之子) 的大作中提到: 】
: rt
: 不能理解呀
: 异步等待,难道不是另一个线程在等吗?
: ...................
--
FROM 125.237.33.*