aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/renderable.rb
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2008-12-22 16:58:48 -0600
committerJoshua Peek <josh@joshpeek.com>2008-12-22 16:58:48 -0600
commitfaf8364050c0a3925a8b2af85b6b5c9e94090986 (patch)
treede8bc8d61dfe9e582076b2ea9ca3e89b8a4d4414 /actionpack/lib/action_view/renderable.rb
parent0b22a96b7aa39cb7244d7cee23f3d03b6117b447 (diff)
downloadrails-faf8364050c0a3925a8b2af85b6b5c9e94090986.tar.gz
rails-faf8364050c0a3925a8b2af85b6b5c9e94090986.tar.bz2
rails-faf8364050c0a3925a8b2af85b6b5c9e94090986.zip
Defining a new method is atomic, no mutex needed.
Diffstat (limited to 'actionpack/lib/action_view/renderable.rb')
-rw-r--r--actionpack/lib/action_view/renderable.rb10
1 files changed, 2 insertions, 8 deletions
diff --git a/actionpack/lib/action_view/renderable.rb b/actionpack/lib/action_view/renderable.rb
index 4a5b36d70a..d8e72f1179 100644
--- a/actionpack/lib/action_view/renderable.rb
+++ b/actionpack/lib/action_view/renderable.rb
@@ -4,10 +4,6 @@ module ActionView
module Renderable #:nodoc:
extend ActiveSupport::Memoizable
- def self.included(base)
- @@mutex = Mutex.new
- end
-
def filename
'compiled-template'
end
@@ -64,10 +60,8 @@ module ActionView
def compile(local_assigns)
render_symbol = method_name(local_assigns)
- @@mutex.synchronize do
- if recompile?(render_symbol)
- compile!(render_symbol, local_assigns)
- end
+ if recompile?(render_symbol)
+ compile!(render_symbol, local_assigns)
end
end