lib/oedipus/connection/pool.rb
# Dispose all connections in the pool.
#
# Waits until all connections have finished processing current queries
# and then releases them.
Dispose all connections in the pool.
Waits until all connections have finished processing current queries
and then releases them.
Dispose all connections in the pool . Waits until all connections have finished processing current queries and then releases them .
def dispose
        begin
          @lock.synchronize do
            while instance = @available.pop
              instance.close
            end
            @condition.wait(@lock) if @used.size > 0
          end
        end until empty?
      end
def dispose begin @lock . synchronize do while instance = @available . pop instance . close end @condition . wait ( @lock ) if @used . size > 0 end end until empty? end
Dispose all connections in the pool.
Dispose all connections in the pool .