aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
authorPratik Naik <pratiknaik@gmail.com>2010-02-04 13:14:44 +0000
committerPratik Naik <pratiknaik@gmail.com>2010-02-04 13:14:44 +0000
commit8260f0b40f8954f1822a0f856f7c0706afbba0bd (patch)
tree1ec6fe65274eeb87c2030ba2daa3e230a375e846 /activesupport/lib
parent6241d4e5535190b817e546130cfe179b641da1ba (diff)
parent6d6e6105c074eb9f266619e77a0873635af94124 (diff)
downloadrails-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')
-rw-r--r--activesupport/lib/active_support/notifications.rb2
-rw-r--r--activesupport/lib/active_support/notifications/fanout.rb4
-rw-r--r--activesupport/lib/active_support/notifications/instrumenter.rb9
-rw-r--r--activesupport/lib/active_support/version.rb2
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