I wanted to be able to run two tasks inside async each function using the "async module".
for example:
async.each(openFiles, function( file, callback) {
// task 1
function(){
callback();
}
function(){
callback(); // task 2, waits for task 1 to finish
}
}, function(err){
console.log("done");
});
Im using each because Im looping through each value and need apply two asks to each element.
asyncagain nested inside the firstasynccallback to run two tasks in parallel.waterfallorseriesfor your two inner functions. Not sure what the two current answers are attempting to do.