instance method
release_connection
Ruby on Rails 4.0.13
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 281
def release_connection(with_id = current_connection_id)
synchronize do
conn = @reserved_connections.delete(with_id)
checkin conn if conn
end
end
Defined in activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb line 281
· View on GitHub
· Improve this page
· Find usages on GitHub