Comparing version 0.10.10 to 0.10.11
@@ -344,3 +344,3 @@ var customUtils = require('./customUtils') | ||
; | ||
for (i = 0; i < preparedDocs.length; i += 1) { | ||
@@ -347,0 +347,0 @@ try { |
@@ -25,3 +25,7 @@ /** | ||
callback = function () { | ||
process.nextTick(cb); | ||
if (typeof setImmediate === 'function') { | ||
setImmediate(cb); | ||
} else { | ||
process.nextTick(cb); | ||
} | ||
lastArg.apply(null, arguments); | ||
@@ -28,0 +32,0 @@ }; |
{ | ||
"name": "nedb", | ||
"version": "0.10.10", | ||
"version": "0.10.11", | ||
"author": { | ||
@@ -5,0 +5,0 @@ "name": "Louis Chatriot", |
@@ -77,4 +77,19 @@ var should = require('chai').should() | ||
// Note: The following test does not have any assertion because it | ||
// is meant to address the deprecation warning: | ||
// (node) warning: Recursive process.nextTick detected. This will break in the next version of node. Please use setImmediate for recursive deferral. | ||
// see | ||
var testEventLoopStarvation = function(d, done){ | ||
var times = 1001; | ||
var i = 0; | ||
while ( i <times) { | ||
i++; | ||
d.find({"bogus": "search"}, function (err, docs) { | ||
}); | ||
} | ||
done(); | ||
}; | ||
describe('Executor', function () { | ||
@@ -117,2 +132,6 @@ | ||
}); | ||
it('Does not starve event loop and raise warning when more than 1000 callbacks are in queue', function(done){ | ||
testEventLoopStarvation(d, done); | ||
}); | ||
@@ -119,0 +138,0 @@ }); // ==== End of 'With persistent database' ==== |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
846633
41
17004