Skip to content

Commit 7a346f6

Browse files
addaleaxtargos
authored andcommitted
src: update comment for SetImmediate()
Refs: #31502 (comment) PR-URL: #32300 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: David Carlier <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent a3848e5 commit 7a346f6

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
@@ -1172,7 +1172,8 @@ class Environment : public MemoryRetainer {
11721172
}
11731173

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

0 commit comments

Comments
 (0)