From 90a28920de3b3e7194e5fb0d431e4f709a1f6155 Mon Sep 17 00:00:00 2001 From: theanarkh Date: Mon, 7 Nov 2022 01:45:23 +0800 Subject: [PATCH] doc: add more info for timer.setInterval PR-URL: https://github.com/nodejs/node/pull/45232 Refs: https://github.com/nodejs/node/issues/45224 Reviewed-By: Benjamin Gruenbaum --- doc/api/timers.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/api/timers.md b/doc/api/timers.md index d054ad7d419c32..21d8213eb71763 100644 --- a/doc/api/timers.md +++ b/doc/api/timers.md @@ -442,6 +442,8 @@ added: v15.9.0 --> Returns an async iterator that generates values in an interval of `delay` ms. +If `ref` is `true`, you need to call `next()` of async iterator explicitly +or implicitly to keep the event loop alive. * `delay` {number} The number of milliseconds to wait between iterations. **Default:** `1`.