Skip to content
Browse files

Revert allow_concurrency change for better testing. Retrieve_connecti…

…on in two steps to avoid side-effect bug (yuk).

git-svn-id: 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent a4c6442 commit 215852745beae6cb4d61d2affff07cc1b2ef0186 @jeremy jeremy committed Mar 2, 2006
2 activerecord/lib/active_record/base.rb
@@ -310,7 +310,7 @@ def self.reset_subclasses
# Determines whether or not to use a connection for each thread, or a single shared connection for all threads.
# Defaults to false. Set to true if you're writing a threaded application.
cattr_accessor :allow_concurrency
- @@allow_concurrency = false
+ @@allow_concurrency = true
# Determines whether to speed up access by generating optimized reader
# methods to avoid expensive calls to method_missing when accessing
3 activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb
@@ -55,7 +55,8 @@ def connection
# retrieve_connection sets the cache key.
- active_connections[@active_connection_name] = retrieve_connection
+ conn = retrieve_connection
+ active_connections[@active_connection_name] = conn

0 comments on commit 2158527

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