|
|
@@ -63,7 +63,13 @@ proto.coalesce = function coalesce(nextSource) {
|
|
|
* @returns {*}
|
|
|
*/
|
|
|
proto.getNext = function getNext(callback) {
|
|
|
- if (!callback) throw new Error(this.getSourceName() + ' #getNext() requires callback.');
|
|
|
+ if (!callback) {
|
|
|
+ throw new Error(this.getSourceName() + ' #getNext() requires callback.');
|
|
|
+ }
|
|
|
+
|
|
|
+ if (this.expCtx.checkForInterrupt && this.expCtx.checkForInterrupt() === false) {
|
|
|
+ return callback(new Error('Interrupted'));
|
|
|
+ }
|
|
|
|
|
|
var self = this,
|
|
|
next;
|
|
|
@@ -167,7 +173,7 @@ klass.isSplittableDocumentSource = true;
|
|
|
* @returns {number}
|
|
|
*/
|
|
|
proto.getDependencies = function getDependencies(deps) {
|
|
|
- return 1; // SEE_NEXT
|
|
|
+ return DocumentSource.GetDepsReturn.SEE_NEXT;
|
|
|
};
|
|
|
|
|
|
/**
|