From 3de125743eda4d060da024e2f3130ee2768141f7 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`.