diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2010-02-04 13:14:44 +0000 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2010-02-04 13:14:44 +0000 |
commit | 8260f0b40f8954f1822a0f856f7c0706afbba0bd (patch) | |
tree | 1ec6fe65274eeb87c2030ba2daa3e230a375e846 /activesupport/lib/active_support | |
parent | 6241d4e5535190b817e546130cfe179b641da1ba (diff) | |
parent | 6d6e6105c074eb9f266619e77a0873635af94124 (diff) | |
download | rails-8260f0b40f8954f1822a0f856f7c0706afbba0bd.tar.gz rails-8260f0b40f8954f1822a0f856f7c0706afbba0bd.tar.bz2 rails-8260f0b40f8954f1822a0f856f7c0706afbba0bd.zip |
Merge remote branch 'mainstream/master'
Conflicts:
railties/guides/source/3_0_release_notes.textile
Diffstat (limited to 'activesupport/lib/active_support')
4 files changed, 3 insertions, 14 deletions
diff --git a/activesupport/lib/active_support/notifications.rb b/activesupport/lib/active_support/notifications.rb index a1383bb478..3e96decb8c 100644 --- a/activesupport/lib/active_support/notifications.rb +++ b/activesupport/lib/active_support/notifications.rb @@ -45,7 +45,7 @@ module ActiveSupport class << self attr_writer :notifier delegate :publish, :subscribe, :to => :notifier - delegate :instrument, :instrument!, :to => :instrumenter + delegate :instrument, :to => :instrumenter def notifier @notifier ||= Notifier.new diff --git a/activesupport/lib/active_support/notifications/fanout.rb b/activesupport/lib/active_support/notifications/fanout.rb index ac482a2ec8..0ec23da073 100644 --- a/activesupport/lib/active_support/notifications/fanout.rb +++ b/activesupport/lib/active_support/notifications/fanout.rb @@ -1,5 +1,3 @@ -require 'thread' - module ActiveSupport module Notifications # This is a default queue implementation that ships with Notifications. It @@ -21,8 +19,8 @@ module ActiveSupport @subscribers.each { |s| s.publish(*args) } end + # This is a sync queue, so there is not waiting. def wait - sleep(0.05) until @subscribers.all?(&:drained?) end # Used for internal implementation only. diff --git a/activesupport/lib/active_support/notifications/instrumenter.rb b/activesupport/lib/active_support/notifications/instrumenter.rb index 7c5b118ee3..f3d877efe7 100644 --- a/activesupport/lib/active_support/notifications/instrumenter.rb +++ b/activesupport/lib/active_support/notifications/instrumenter.rb @@ -20,15 +20,6 @@ module ActiveSupport result end - # The same as instrument, but sends the notification even if the yielded - # block raises an error. - def instrument!(name, payload={}) - time = Time.now - yield(payload) if block_given? - ensure - @notifier.publish(name, time, Time.now, @id, payload) - end - private def unique_id SecureRandom.hex(10) diff --git a/activesupport/lib/active_support/version.rb b/activesupport/lib/active_support/version.rb index 3ae6150f2d..b92e469a08 100644 --- a/activesupport/lib/active_support/version.rb +++ b/activesupport/lib/active_support/version.rb @@ -2,7 +2,7 @@ module ActiveSupport module VERSION #:nodoc: MAJOR = 3 MINOR = 0 - TINY = "pre" + TINY = "0.beta" STRING = [MAJOR, MINOR, TINY].join('.') end |