function() {
          var deferred;
          deferred = Q.defer();
          if (running.length < limit) {
            running.push(deferred);
            deferred.resolve();
          } else {
            queue.push(deferred);
          }
          return deferred.promise;
        }
function() {
          var deferred;
          deferred = Q.defer();
          if (running.length < limit) {
            running.push(deferred);
            deferred.resolve();
          } else {
            queue.push(deferred);
          }
          return deferred.promise;
        }
function ( ) { var deferred ; deferred = Q . defer ( ) ; if ( running . length < limit ) { running . push ( deferred ) ; deferred . resolve ( ) ; } else { queue . push ( deferred ) ; } return deferred . promise ; }
Gets a promise from the queue that will resolve when there is a slot available

@function ready

@return {Promise}   Will resolve when a slot if available in the queue
Gets a promise from the queue that will resolve when there is a slot available