Closed
Description
Affected URL(s)
https://nodejs.org/api/timers.html#timeoutunref
Description of the problem
The documentation for timeout.unref()
ends with this warning:
Calling
timeout.unref()
creates an internal timer that will wake the Node.js event loop. Creating too many of these can adversely impact performance of the Node.js application.
I don't understand what this means.
"creates an internal timer that will wake the Node.js event loop" sounds roughly like what setTimeout
does. Is it different?
Tangent: I also noticed that the docs for the new timersPromises.setInterval
(link) supports the ref
parameter but there's no similar warning there.