Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/filterStorage.js

Issue 29340849: Issue 3993 - Implement Utils.yield() in a better way (core part) (Closed)
Patch Set: Created April 26, 2016, 6:49 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/filterStorage.js
===================================================================
--- a/lib/filterStorage.js
+++ b/lib/filterStorage.js
@@ -790,11 +790,11 @@ INIParser.prototype =
Filter.knownFilters = origKnownFilters;
Subscription.knownSubscriptions = origKnownSubscriptions;
}
// Allow events to be processed every now and then.
// Note: IO.readFromFile() will deal with the potential reentrance here.
this.linesProcessed++;
if (this.linesProcessed % 1000 == 0)
- Utils.yield();
+ return Utils.yield();
}
};
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld