def resize
      @logger.info("Pool is being resized to stated maximum: #{max}")
      until(size <= max) do
        t = nil
        t = @threads.find{|x|x.waiting?}
        t = @threads.shift unless t
        t.stop
      end
      flush
      nil
    end
def resize
      @logger.info("Pool is being resized to stated maximum: #{max}")
      until(size <= max) do
        t = nil
        t = @threads.find{|x|x.waiting?}
        t = @threads.shift unless t
        t.stop
      end
      flush
      nil
    end
Resize the pool