Browse files

Defining a new method is atomic, no mutex needed.

  • Loading branch information...
1 parent 0b22a96 commit faf8364050c0a3925a8b2af85b6b5c9e94090986 @josh josh committed Dec 22, 2008
Showing with 2 additions and 8 deletions.
  1. +2 −8 actionpack/lib/action_view/renderable.rb
View
10 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 @@ def method_name(local_assigns)
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

0 comments on commit faf8364

Please sign in to comment.