<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,5 +1,7 @@
 *Edge*
 
+* Added config.threadsafe! to toggle allow concurrency settings and disable the dependency loader [Josh Peek]
+
 * Turn cache_classes on by default [Josh Peek]
 
 * Added configurable eager load paths. Defaults to app/models, app/controllers, and app/helpers [Josh Peek]</diff>
      <filename>railties/CHANGELOG</filename>
    </modified>
    <modified>
      <diff>@@ -4,6 +4,9 @@
 # Code is not reloaded between requests
 config.cache_classes = true
 
+# Enable threaded mode
+# config.threadsafe!
+
 # Use a different logger for distributed setups
 # config.logger = SyslogLogger.new
 </diff>
      <filename>railties/environments/production.rb</filename>
    </modified>
    <modified>
      <diff>@@ -768,6 +768,18 @@ Run `rake gems:install` to install the missing gems.
       ::RAILS_ROOT.replace @root_path
     end
 
+    # Enable threaded mode. Allows concurrent requests to controller actions and
+    # multiple database connections. Also disables automatic dependency loading
+    # after boot
+    def threadsafe!
+      self.cache_classes = true
+      self.dependency_loading = false
+      self.active_record.allow_concurrency = true
+      self.action_controller.allow_concurrency = true
+      self.to_prepare { Rails.cache.threadsafe! }
+      self
+    end
+
     # Loads and returns the contents of the #database_configuration_file. The
     # contents of the file are processed via ERB before being sent through
     # YAML::load.</diff>
      <filename>railties/lib/initializer.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>ddd552504bd682d64aa63bd06aa3f74818d48493</id>
    </parent>
  </parents>
  <author>
    <name>Joshua Peek</name>
    <login>josh</login>
    <email>josh@joshpeek.com</email>
  </author>
  <url>http://github.com/rails/rails/commit/177a35e711e3b21eac0eb19f03aeae7626e490f5</url>
  <id>177a35e711e3b21eac0eb19f03aeae7626e490f5</id>
  <committed-date>2008-08-04T20:19:41-07:00</committed-date>
  <authored-date>2008-08-01T22:42:32-07:00</authored-date>
  <message>Added config.threadsafe! to toggle allow concurrency settings and disable the dependency loader</message>
  <tree>4042c7492cc57d79dc6935ffc0677f5f4426740b</tree>
  <committer>
    <name>Joshua Peek</name>
    <login>josh</login>
    <email>josh@joshpeek.com</email>
  </committer>
</commit>
