| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent a569ae4 commit dafaff3
5 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,8 +5,6 @@ const bench = common.createBenchmark(main, { | |||
| 5 | 5 | n: [12e6] | |
| 6 | 6 | }); | |
| 7 | 7 | ||
| 8 | - process.maxTickDepth = Infinity; | ||
| 9 | - | ||
| 10 | 8 | function main({ n }) { | |
| 11 | 9 | let counter = n; | |
| 12 | 10 | function cb4(arg1, arg2, arg3, arg4) { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4,8 +4,6 @@ const bench = common.createBenchmark(main, { | |||
| 4 | 4 | n: [12e6] | |
| 5 | 5 | }); | |
| 6 | 6 | ||
| 7 | - process.maxTickDepth = Infinity; | ||
| 8 | - | ||
| 9 | 7 | function main({ n }) { | |
| 10 | 8 | let counter = n; | |
| 11 | 9 | bench.start(); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -23,12 +23,8 @@ | |||
| 23 | 23 | require('../common'); | |
| 24 | 24 | const assert = require('assert'); | |
| 25 | 25 | ||
| 26 | - // this is the inverse of test-next-tick-starvation. | ||
| 27 | - // it verifies that process.nextTick will *always* come before other | ||
| 28 | - // events, up to the limit of the process.maxTickDepth value. | ||
| 29 | - | ||
| 30 | - // WARNING: unsafe! | ||
| 31 | - process.maxTickDepth = Infinity; | ||
| 26 | + // this is the inverse of test-next-tick-starvation. it verifies | ||
| 27 | + // that process.nextTick will *always* come before other events | ||
| 32 | 28 | ||
| 33 | 29 | let ran = false; | |
| 34 | 30 | let starved = false; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -22,13 +22,13 @@ | |||
| 22 | 22 | 'use strict'; | |
| 23 | 23 | const common = require('../common'); | |
| 24 | 24 | const Readable = require('stream').Readable; | |
| 25 | + | ||
| 26 | + // This tests synchronous read callbacks and verifies that even if they nest | ||
| 27 | + // heavily the process handles it without an error | ||
| 28 | + | ||
| 25 | 29 | const r = new Readable(); | |
| 26 | 30 | const N = 256 * 1024; | |
| 27 | 31 | ||
| 28 | - // Go ahead and allow the pathological case for this test. | ||
| 29 | - // Yes, it's an infinite loop, that's the point. | ||
| 30 | - process.maxTickDepth = N + 2; | ||
| 31 | - | ||
| 32 | 32 | let reads = 0; | |
| 33 | 33 | r._read = function(n) { | |
| 34 | 34 | const chunk = reads++ === N ? null : Buffer.allocUnsafe(1); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -39,7 +39,6 @@ if (process.argv[2] !== 'child') { | |||
| 39 | 39 | ||
| 40 | 40 | const domain = require('domain'); | |
| 41 | 41 | const d = domain.create(); | |
| 42 | - process.maxTickDepth = 10; | ||
| 43 | 42 | ||
| 44 | 43 | // in the error handler, we trigger several MakeCallback events | |
| 45 | 44 | d.on('error', function() { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments