title: using async.js with node.js streams
body: <p>I want to use asyn.js for limiting the number of parallel io operations. I have come across the following example:</p>
  
  <pre><code>async.forEachLimit items, 5, ((item, next) -&gt;
    request item.url, (error, response, body) -&gt;
      console.log body
      next error)
      , (err) -&gt;
          throw err  if err
          console.log "All requests processed!"
  </code></pre>
  
  <p>But I want to use it with streams, like this:</p>
  
  <pre><code>async.forEachLimit items, 5, ((item, next)-&gt;
      stream = fs.createWriteStream file
      request.get(item.url).pipe(stream))
      , (err)-&gt;
            throw err  if err
            console.log "All requests processed!"
  </code></pre>
  
  <p>How do I place the 'next' call when the writestream is done writing to file?</p>