1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Revert allow_concurrency change for better testing. Retrieve_connection in two steps to avoid side-effect bug (yuk).

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3745 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
Jeremy Kemper 2006-03-02 14:36:06 +00:00
parent a4c6442612
commit 215852745b
2 changed files with 3 additions and 2 deletions

View file

@ -310,7 +310,7 @@ module ActiveRecord #:nodoc:
# Determines whether or not to use a connection for each thread, or a single shared connection for all threads. # 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. # Defaults to false. Set to true if you're writing a threaded application.
cattr_accessor :allow_concurrency cattr_accessor :allow_concurrency
@@allow_concurrency = false @@allow_concurrency = true
# Determines whether to speed up access by generating optimized reader # Determines whether to speed up access by generating optimized reader
# methods to avoid expensive calls to method_missing when accessing # methods to avoid expensive calls to method_missing when accessing

View file

@ -55,7 +55,8 @@ module ActiveRecord
conn conn
else else
# retrieve_connection sets the cache key. # retrieve_connection sets the cache key.
active_connections[@active_connection_name] = retrieve_connection conn = retrieve_connection
active_connections[@active_connection_name] = conn
end end
end end