Skip to content
Browse files

Remove some synchronization that's probably overkill, assuming one do…

…esn't establish connections frequently
  • Loading branch information...
1 parent c1b9498 commit 113cc4e1c41b8246b8f6327b58bd315be72469e7 @nicksieger nicksieger committed Aug 23, 2008
Showing with 1 addition and 10 deletions.
  1. +1 −10 activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb
View
11 activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb
@@ -161,8 +161,7 @@ def checkin(conn)
end
end
- synchronize :connection, :release_connection,
- :clear_reloadable_connections!, :verify_active_connections!,
+ synchronize :clear_reloadable_connections!, :verify_active_connections!,
:connected?, :disconnect!, :with => :@connection_mutex
private
@@ -209,11 +208,8 @@ def checkout_and_verify(c)
end
class ConnectionHandler
- attr_reader :connection_pools_lock
-
def initialize(pools = {})
@connection_pools = pools
- @connection_pools_lock = Monitor.new
end
def connection_pools
@@ -282,11 +278,6 @@ def retrieve_connection_pool(klass)
klass = klass.superclass
end
end
-
- # Apply monitor to all public methods that access the pool.
- synchronize :establish_connection, :retrieve_connection, :connected?, :remove_connection,
- :clear_active_connections!, :clear_reloadable_connections!, :clear_all_connections!,
- :verify_active_connections!, :with => :connection_pools_lock
end
end
end

0 comments on commit 113cc4e

Please sign in to comment.
Something went wrong with that request. Please try again.