aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2008-06-08 22:11:08 -0500
committerJoshua Peek <josh@joshpeek.com>2008-06-08 22:11:50 -0500
commit0c9281e82140f3a69e4473b3bcefd5ccebd79e2d (patch)
tree48fa0799cb0d7e288de80c410b23c6b4267ac09e
parentff5f155f8dc1d2ba363718c3e17f99719399eab5 (diff)
downloadrails-0c9281e82140f3a69e4473b3bcefd5ccebd79e2d.tar.gz
rails-0c9281e82140f3a69e4473b3bcefd5ccebd79e2d.tar.bz2
rails-0c9281e82140f3a69e4473b3bcefd5ccebd79e2d.zip
Drop ActionController::Base.allow_concurrency flag
-rw-r--r--actionpack/CHANGELOG2
-rwxr-xr-xactionpack/lib/action_controller/base.rb7
-rw-r--r--railties/lib/webrick_server.rb13
3 files changed, 4 insertions, 18 deletions
diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG
index 8265b5b04f..3096716dba 100644
--- a/actionpack/CHANGELOG
+++ b/actionpack/CHANGELOG
@@ -1,5 +1,7 @@
*Edge*
+* Drop ActionController::Base.allow_concurrency flag [Josh Peek]
+
* More efficient concat and capture helpers. Remove ActionView::Base.erb_variable. [Jeremy Kemper]
* Added page.reload functionality. Resolves #277. [Sean Huber]
diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb
index a036600c2b..44269fc735 100755
--- a/actionpack/lib/action_controller/base.rb
+++ b/actionpack/lib/action_controller/base.rb
@@ -283,13 +283,6 @@ module ActionController #:nodoc:
@@debug_routes = true
cattr_accessor :debug_routes
- # Indicates to Mongrel or Webrick whether to allow concurrent action
- # processing. Your controller actions and any other code they call must
- # also behave well when called from concurrent threads. Turned off by
- # default.
- @@allow_concurrency = false
- cattr_accessor :allow_concurrency
-
# Modern REST web services often need to submit complex data to the web application.
# The <tt>@@param_parsers</tt> hash lets you register handlers which will process the HTTP body and add parameters to the
# <tt>params</tt> hash. These handlers are invoked for POST and PUT requests.
diff --git a/railties/lib/webrick_server.rb b/railties/lib/webrick_server.rb
index ad4ca926ba..2f60151b22 100644
--- a/railties/lib/webrick_server.rb
+++ b/railties/lib/webrick_server.rb
@@ -43,8 +43,6 @@ end
# can change this behavior by setting ActionController::Base.allow_concurrency
# to true.
class DispatchServlet < WEBrick::HTTPServlet::AbstractServlet
- REQUEST_MUTEX = Mutex.new
-
# Start the WEBrick server with the given options, mounting the
# DispatchServlet at <tt>/</tt>.
def self.dispatch(options = {})
@@ -73,15 +71,8 @@ class DispatchServlet < WEBrick::HTTPServlet::AbstractServlet
def service(req, res) #:nodoc:
unless handle_file(req, res)
- begin
- REQUEST_MUTEX.lock unless ActionController::Base.allow_concurrency
- unless handle_dispatch(req, res)
- raise WEBrick::HTTPStatus::NotFound, "`#{req.path}' not found."
- end
- ensure
- unless ActionController::Base.allow_concurrency
- REQUEST_MUTEX.unlock if REQUEST_MUTEX.locked?
- end
+ unless handle_dispatch(req, res)
+ raise WEBrick::HTTPStatus::NotFound, "`#{req.path}' not found."
end
end
end