You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
you are right, and just for reference here the now working version
varasync=require("async");// https://github.com/caolan/async// create a queue object with concurrency 200varq=async.queue(function(task,callback){functiondoIt(){console.log("working with:"+task.name);callback();};process.nextTick(doIt);},200);// assign a callback to call when all task are finishedq.drain=function(){console.log('all items have been processed');}varasyncTest=function(){for(vari=0;i<10000;i++){q.push({"name": i},function(err){console.log("processed:"+this.data.name);});}};asyncTest();
async version: 0.1.18
machine: i7, 16GB Ram, OSX
i try to use the async library for queueing async processing of around 10000 items and so far i am always getting the
RangeError: Maximum call stack size exceeded
Exception
to count my poor javascript skills out i just used the example at https://github.com/caolan/async#queue
and enhanced it with
var asyncTest = function() {
for(var i = 0; i < 10000; i++) {
q.push({"counter": i}, function (err) {
console.log('finished processing:' + i);
});
}
};
asyncTest();
it will give the infamous exception
The text was updated successfully, but these errors were encountered: