ソースを参照

refs #3074: Removed call to process.nextTick

Jared Hall 12 年 前
コミット
1e364a485a

+ 1 - 1
lib/pipeline/documentSources/CursorDocumentSource.js

@@ -167,7 +167,7 @@ proto.getCurrent = function getCurrent() {
  **/
 proto.setSource = function setSource(theSource, callback) {
 	if (theSource) throw new Error("CursorDocumentSource doesn't take a source"); //TODO: This needs to put back without the if once async is fully and properly supported
-	if (callback) return process.nextTick(callback);
+	if (callback) return setImmediate(callback);
 };
 
 /**

+ 1 - 1
lib/pipeline/documentSources/DocumentSource.js

@@ -139,7 +139,7 @@ proto.getSourceName = function getSourceName() {
 proto.setSource = function setSource(theSource, callback) {
 	if (this.source) throw new Error("It is an error to set the source more than once");
 	this.source = theSource;
-	if (callback) return process.nextTick(callback);
+	if (callback) return setImmediate(callback);
 };
 
 /**