Permalink
Browse files

lib: rename kMaxCallbacksUntilQueueIsShortened

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 jasnell committed Feb 21, 2017
1 parent 6ae159f commit d42296bd985ae7df1e8d8cd09e4ca2403186401b
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/internal/process/next_tick.js
@@ -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;
@@ -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();
@@ -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();

0 comments on commit d42296b

Please sign in to comment.