lib/index.js
function _write (file, encoding, next) {
          this.workers++
          vow.resolve(file)
          .then((file) => folder.downloadFile(file))
          .then((file) => folder.frontMatter(file))
          .then((file) => folder.storeFile(file))
          .catch(dbg)
          .then(() => {
            this.workers--
            next()
          })

          // if not at concurrency limit, call next immediately (don't wait for
          // worker to finish)
          if (this.workers < this.concurrency) {
            next()
            next = () => {}
          }
        }
function _write (file, encoding, next) {
          this.workers++
          vow.resolve(file)
          .then((file) => folder.downloadFile(file))
          .then((file) => folder.frontMatter(file))
          .then((file) => folder.storeFile(file))
          .catch(dbg)
          .then(() => {
            this.workers--
            next()
          })

          // if not at concurrency limit, call next immediately (don't wait for
          // worker to finish)
          if (this.workers < this.concurrency) {
            next()
            next = () => {}
          }
        }
function _write ( file , encoding , next ) { this . workers ++ vow . resolve ( file ) . then ( ( file ) => folder . downloadFile ( file ) ) . then ( ( file ) => folder . frontMatter ( file ) ) . then ( ( file ) => folder . storeFile ( file ) ) . catch ( dbg ) . then ( ( ) => { this . workers -- next ( ) } ) // if not at concurrency limit, call next immediately (don't wait for // worker to finish) if ( this . workers < this . concurrency ) { next ( ) next = ( ) => { } } }
don't change this 
## _write
this is where the parallel stream magic happens.. pay attention
each time `_write` is called, we either call `next` immediately (if
we haven't yet reached concurrency limit) or we call `next` once the
worker has finished.

@param {Object} file pushed from streamFiles
@param {String} encoding ignored
@param {Function} next call when ready for subsequent worker to start
don t change this ## _write this is where the parallel stream magic happens .. pay attention each time _write is called we either call next immediately ( if we haven t yet reached concurrency limit ) or we call next once the worker has finished .