includes/writer.js
function() {
          // if we encountered an error, stop this until loop
          if (didError) {
            return true;
          }
          if (flush) {
            return q.idle() && q.length() === 0;
          } else {
            return q.length() <= parallelism * 2;
          }
        }
function() {
          // if we encountered an error, stop this until loop
          if (didError) {
            return true;
          }
          if (flush) {
            return q.idle() && q.length() === 0;
          } else {
            return q.length() <= parallelism * 2;
          }
        }
function ( ) { // if we encountered an error, stop this until loop if ( didError ) { return true ; } if ( flush ) { return q . idle ( ) && q . length ( ) === 0 ; } else { return q . length ( ) <= parallelism * 2 ; } }
wait until the queue length drops to twice the paralellism or until empty on the last write
wait until the queue length drops to twice the paralellism or until empty on the last write