aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2012-06-19 10:35:26 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2012-06-19 10:37:51 -0700
commitb2ca26a44ca466ec5624be705b1e1ef5d5d7963c (patch)
tree264f541d4ee773a605ec6ea2e7006e14c33b0670 /activesupport
parent0b38152195325e35025f483896b8676aeb0442b1 (diff)
downloadrails-b2ca26a44ca466ec5624be705b1e1ef5d5d7963c.tar.gz
rails-b2ca26a44ca466ec5624be705b1e1ef5d5d7963c.tar.bz2
rails-b2ca26a44ca466ec5624be705b1e1ef5d5d7963c.zip
subscribers are per thread, so remove the nested hash access
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/notifications/fanout.rb8
1 files changed, 3 insertions, 5 deletions
diff --git a/activesupport/lib/active_support/notifications/fanout.rb b/activesupport/lib/active_support/notifications/fanout.rb
index 343bf478a3..3a2ccf1489 100644
--- a/activesupport/lib/active_support/notifications/fanout.rb
+++ b/activesupport/lib/active_support/notifications/fanout.rb
@@ -88,9 +88,7 @@ module ActiveSupport
class Timed < Evented
def initialize(pattern, delegate)
- @timestack = Hash.new { |h,id|
- h[id] = Hash.new { |ids,name| ids[name] = [] }
- }
+ @timestack = []
super
end
@@ -99,11 +97,11 @@ module ActiveSupport
end
def start(name, id, payload)
- @timestack[id][name].push Time.now
+ @timestack.push Time.now
end
def finish(name, id, payload)
- started = @timestack[id][name].pop
+ started = @timestack.pop
@delegate.call(name, started, Time.now, id, payload)
end
end