Skip to content

Commit 11650c6

Browse files
addaleaxMylesBorins
authored andcommitted
src: update comment for SetImmediate()
Refs: #31502 (comment) PR-URL: #32300 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 2cb9f7a commit 11650c6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/env.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1171,7 +1171,8 @@ class Environment : public MemoryRetainer {
11711171
}
11721172

11731173
// cb will be called as cb(env) on the next event loop iteration.
1174-
// keep_alive will be kept alive between now and after the callback has run.
1174+
// Unlike the JS setImmediate() function, nested SetImmediate() calls will
1175+
// be run without returning control to the event loop, similar to nextTick().
11751176
template <typename Fn>
11761177
inline void SetImmediate(Fn&& cb);
11771178
template <typename Fn>

0 commit comments

Comments
 (0)