Skip to content

Commit daf601f

Browse files
committed
src: update comment for SetImmediate()
Refs: nodejs#31502 (comment)
1 parent 25cb855 commit daf601f

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
@@ -1177,7 +1177,8 @@ class Environment : public MemoryRetainer {
11771177
}
11781178

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

0 commit comments

Comments
 (0)