Skip to content

Commit

Permalink
src: update comment for SetImmediate()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
addaleax authored and targos committed Apr 22, 2020
1 parent a3848e5 commit 7a346f6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/env.h
Original file line number Diff line number Diff line change
Expand Up @@ -1172,7 +1172,8 @@ class Environment : public MemoryRetainer {
}

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

0 comments on commit 7a346f6

Please sign in to comment.