Skip to content

Commit

Permalink
lib: rename kMaxCallbacksUntilQueueIsShortened
Browse files Browse the repository at this point in the history
PR-URL: #11473
Ref: #11199 (comment)
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
  • Loading branch information
JungMinu authored and MylesBorins committed Mar 9, 2017
1 parent a6b2dfa commit 69327f5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/internal/process/next_tick.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// large and cause the process to run out of memory. When this value
// is reached the nextTimeQueue array will be shortend (see tickDone
// for details).
const kMaxCallbacksUntilQueueIsShortened = 1e4;
const kMaxCallbacksPerLoop = 1e4;

exports.setup = setupNextTick;

Expand Down Expand Up @@ -102,7 +102,7 @@ function setupNextTick() {
// callback invocation with small numbers of arguments to avoid the
// performance hit associated with using `fn.apply()`
_combinedTickCallback(args, callback);
if (kMaxCallbacksUntilQueueIsShortened < tickInfo[kIndex])
if (kMaxCallbacksPerLoop < tickInfo[kIndex])
tickDone();
}
tickDone();
Expand All @@ -126,7 +126,7 @@ function setupNextTick() {
// callback invocation with small numbers of arguments to avoid the
// performance hit associated with using `fn.apply()`
_combinedTickCallback(args, callback);
if (kMaxCallbacksUntilQueueIsShortened < tickInfo[kIndex])
if (kMaxCallbacksPerLoop < tickInfo[kIndex])
tickDone();
if (domain)
domain.exit();
Expand Down

0 comments on commit 69327f5

Please sign in to comment.