diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2006-03-01 22:04:30 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2006-03-01 22:04:30 +0000 |
commit | d8641ca34f126367c53487697327bc4b92ed143f (patch) | |
tree | cfe078b540e9c82512b642fb6b4b6e966f06071d /activerecord | |
parent | 0d92ce59ff45a0e2091c89e5ab976bff803f4b22 (diff) | |
download | rails-d8641ca34f126367c53487697327bc4b92ed143f.tar.gz rails-d8641ca34f126367c53487697327bc4b92ed143f.tar.bz2 rails-d8641ca34f126367c53487697327bc4b92ed143f.zip |
CHANGED DEFAULT: set ActiveRecord::Base.allow_concurrency to false. Most AR usage is in single-threaded applications.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3728 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/CHANGELOG | 2 | ||||
-rwxr-xr-x | activerecord/lib/active_record/base.rb | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/activerecord/CHANGELOG b/activerecord/CHANGELOG index e24268ccb9..06f621e967 100644 --- a/activerecord/CHANGELOG +++ b/activerecord/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* CHANGED DEFAULT: set ActiveRecord::Base.allow_concurrency to false. Most AR usage is in single-threaded applications. [Jeremy Kemper] + * Renamed the "oci" adapter to "oracle", but kept the old name as an alias #4017 [schoenm@earthlink.net] * Fixed that Base.save should always return false if the save didn't succeed, including if it has halted by before_save's #1861, #2477 [DHH] diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index 1fd247e47b..9edd03e80c 100755 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -306,12 +306,12 @@ module ActiveRecord #:nodoc: # This is set to :local by default. cattr_accessor :default_timezone @@default_timezone = :local - + # Determines whether or not to use a connection for each thread, or a single shared connection for all threads. - # Defaults to true; Railties' WEBrick server sets this to false. + # Defaults to false. Set to true if you're writing a threaded application. cattr_accessor :allow_concurrency - @@allow_concurrency = true - + @@allow_concurrency = false + # Determines whether to speed up access by generating optimized reader # methods to avoid expensive calls to method_missing when accessing # attributes by name. You might want to set this to false in development |