def grow
      @lock.synchronize do
        prune
        logger.debug { "jobs: #{num_jobs}; busy: #{num_working}; idle: #{num_idle}" }
        if @size == 0 || (@size < @max_size && num_jobs > 0 && num_jobs > num_idle) then
          space = @max_size-@size
          jobs = num_jobs-num_idle
          needed = space < jobs ? space : jobs
          needed = 1 if needed <= 0
          expand(needed)
        else
          logger.debug "NOT growing the pool!"
        end
      end

      nil
    end
def grow
      @lock.synchronize do
        prune
        logger.debug { "jobs: #{num_jobs}; busy: #{num_working}; idle: #{num_idle}" }
        if @size == 0 || (@size < @max_size && num_jobs > 0 && num_jobs > num_idle) then
          space = @max_size-@size
          jobs = num_jobs-num_idle
          needed = space < jobs ? space : jobs
          needed = 1 if needed <= 0
          expand(needed)
        else
          logger.debug "NOT growing the pool!"
        end
      end

      nil
    end
Grow the pool by one if we have more jobs than idle workers