aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Sieger <nick@nicksieger.com>2008-08-23 01:24:34 -0500
committerNick Sieger <nick@nicksieger.com>2008-08-29 14:12:13 -0500
commit113cc4e1c41b8246b8f6327b58bd315be72469e7 (patch)
tree646d3a91061f3f6d8d354809d9f7eadf4a9fda3f
parentc1b949869c3de8fc62f8ab072bbd77542b1d3605 (diff)
downloadrails-113cc4e1c41b8246b8f6327b58bd315be72469e7.tar.gz
rails-113cc4e1c41b8246b8f6327b58bd315be72469e7.tar.bz2
rails-113cc4e1c41b8246b8f6327b58bd315be72469e7.zip
Remove some synchronization that's probably overkill, assuming one doesn't establish connections frequently
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb11
1 files changed, 1 insertions, 10 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb b/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb
index 85ecd9d6c6..fe6ba47d69 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb
@@ -161,8 +161,7 @@ module ActiveRecord
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 @@ module ActiveRecord
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 @@ module ActiveRecord
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 \ No newline at end of file