Browse Source

lib: rename kMaxCallbacksUntilQueueIsShortened

PR-URL: https://github.com/nodejs/node/pull/11473
Ref: https://github.com/nodejs/node/pull/11199#issuecomment-281184439
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
v6.x
JungMinu 8 years ago
committed by Myles Borins
parent
commit
69327f5e72
No known key found for this signature in database GPG Key ID: 933B01F40B5CA946
  1. 6
      lib/internal/process/next_tick.js

6
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();

Loading…
Cancel
Save