title: node.js async.series with async.each not doing as expected
body: <p>I'm really struggling to get arrays iterated in a certain order and each one should finish before the next can start. I've tried using async.series and async.each but the results are not as I expected them.</p>
  
  <p>I have this code:</p>
  
  <pre><code>var async = require('async');
  var abc = ['a', 'b', 'c'];
  
  // Step 1
  function one(callback) {
    async.each(abc, function(issue, callback) {
      setTimeout(function(){
        issue += '1';
        console.log('Processing issue ' + issue);
      }, 2000);
  
      callback();
    }, function(err) {
      if(err) {
        console.log('Fail 1');
      } else {
        console.log('Success 1');
      }
    });
  }
  
  // Step 2
  function two(callback) {
    async.each(abc, function(issue, callback) {
      setTimeout(function(){
        issue += '2';
        // Perform operation on file here.
        console.log('Processing issue ' + issue);
      }, 2000);
  
      callback();
    }, function(err) {
      if(err) {
        console.log('Fail 2');
      } else {
        console.log('Success 2');
      }
    });
  }
  
  // Step 3
  function three(callback) {
    async.each(abc, function(issue, callback) {
      setTimeout(function(){
        issue += '3';
        // Perform operation on file here.
        console.log('Processing issue ' + issue);
      }, 2000);
  
      callback();
    }, function(err) {
      if(err) {
        console.log('Fail 3');
      } else {
        console.log('Success 3');
      }
    });
  }
  
  async.series([
    function(callback) {
      console.log('step 1 in async.series');
      one(callback);
  
      callback();
    },
    function(callback) {
      console.log('step 2 in async.series');
      two(callback);
  
      callback();
    },
    function(callback) {
      console.log('step 3 in async.series');
      three(callback);
  
      callback();
    }
  ], function(err) {
    if(err) return next(err);
  
    console.log('Done:');
  });
  </code></pre>
  
  <p>Result:</p>
  
  <pre><code>step 1 in async.series
  Success 1
  step 2 in async.series
  Success 2
  step 3 in async.series
  Success 3
  Done:
  //After two second timeout all below happens at once
  Processing issue a1
  Processing issue b1
  Processing issue c1
  Processing issue a2
  Processing issue b2
  Processing issue c2
  Processing issue a3
  Processing issue b3
  Processing issue c3
  </code></pre>
  
  <p>Expected:</p>
  
  <pre><code>step 1 in async.series
  //Expected below after two second timeout
  Processing issue a1
  Processing issue a2
  Processing issue a3
  Success 1
  step 2 in async.series
  //Expected below after two+two second timeout
  Processing issue b1
  Processing issue b2
  Processing issue b3
  Success 2
  step 3 in async.series
  //Expected below after two+two+two second timeout
  Processing issue c1
  Processing issue c2
  Processing issue c3
  Success 3
  Done:
  </code></pre>
  
  <p>What should I do instead to get expected results??</p>
  
  <p>Thanks!</p>