What version of async are you using?
^2.0.0-rc.6
Which environment did the issue occur in (Node version/browser version)
Node v5.10.0 & NPM 3.8.3
What did you do? Please include a minimal reproducable case illustrating issue.
var async = require('async');
async.each(['foo', 'bar', 'duh'], function(data, callback) {
console.log('starting.. '+data);
setTimeout(function() {
console.log('started '+data);
callback();
}, 5000);
}, function(err) {
console.log('all started');
});
What did you expect to happen?
starting.. foo
started foo
starting.. bar
started bar
starting.. duh
started duh
all started
What was the actual result?
starting.. foo
starting.. bar
starting.. duh
started foo
started bar
started duh
all started
You want eachSeries
Most helpful comment
You want
eachSeries