Skip to content

Commit

Permalink
fix(android): allow node to clear event loop
Browse files Browse the repository at this point in the history
As the iterate function here is sync with large numbers of files (say a hyperloop project) we could
run into an issue where node hasn't had a chance to clear the event loop and we'd bog it down with
the constant calls. By putting the test callback into a nextTick call it allows node the chance to
clear the event loop before we choke it

Ref TIMOB-28090
  • Loading branch information
ewanharris authored and sgtcoolguy committed Aug 27, 2020
1 parent 37d88bd commit d6d9a5b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion android/cli/commands/_build.js
Original file line number Diff line number Diff line change
Expand Up @@ -2494,7 +2494,7 @@ AndroidBuilder.prototype.copyResources = function copyResources(next) {

async.whilst(
function (cb) {
return cb(null, files.length);
process.nextTick(() => cb(null, files.length));
},

function (next) {
Expand Down

0 comments on commit d6d9a5b

Please sign in to comment.