How to execute functions in parallel with async.js?
In the following code, I have Array.forEach , It executes the doSomething synchronous function in sequence: items.forEach(function(item) { doSomething(item); }); I need to execute functions ( doSomething ) in parallel, use async.js and try the following: async.each(items, function (item, doneCallback) { var startDate = new Date(); console.log(item.name().toString() + ' startDate: ' + startDate.toString() + ' - ' + startDate.getMilliseconds().toString()); doSomething(item); //Lazy function for many operations. var endDate = new Date(); console.log(item.name().toString() + ' endDate' + endDate