instance method
release_connection
Ruby on Rails 3.2.22.5
Since v2.2.3Signature
release_connection(with_id = current_connection_id)
Signal that the thread is finished with the current connection. #release_connection releases the connection-thread association and returns the connection to the pool.
Parameters
-
with_idopt = current_connection_id
Source
# File activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb, line 118
def release_connection(with_id = current_connection_id)
conn = synchronize { @reserved_connections.delete(with_id) }
checkin conn if conn
end
Defined in activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb line 118
· View on GitHub
· Improve this page
· Find usages on GitHub