class ActiveRecord::ConnectionAdapters::ConnectionPool
def release_connection(owner_thread = Thread.current)
#connection or #with_connection methods, connections obtained through
This method only works for connections that have been obtained through
and returns the connection to the pool.
#release_connection releases the connection-thread association
Signal that the thread is finished with the current connection.
def release_connection(owner_thread = Thread.current) if conn = @thread_cached_conns.delete(connection_cache_key(owner_thread)) checkin conn end end