aboutsummaryrefslogtreecommitdiffstats
path: root/railties/guides/source/active_support_core_extensions.textile
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2011-12-24 11:46:41 -0800
committerJosé Valim <jose.valim@gmail.com>2011-12-24 11:46:41 -0800
commit0d7c3757a9ad96b0e8aa67fc93c389890c989fd0 (patch)
tree19b6c7c3596b05896e84cd2c0c22c7662fed514c /railties/guides/source/active_support_core_extensions.textile
parente3daaeea33bceeaebd39942e248145dc14b72108 (diff)
parent40566dc19bf71123231bd23b94c6b9b9cbc70f1b (diff)
downloadrails-0d7c3757a9ad96b0e8aa67fc93c389890c989fd0.tar.gz
rails-0d7c3757a9ad96b0e8aa67fc93c389890c989fd0.tar.bz2
rails-0d7c3757a9ad96b0e8aa67fc93c389890c989fd0.zip
Merge pull request #4170 from lest/remove-deprecated-synchronize
remove deprecated Module#synchronize from ActiveSupport
Diffstat (limited to 'railties/guides/source/active_support_core_extensions.textile')
-rw-r--r--railties/guides/source/active_support_core_extensions.textile24
1 files changed, 0 insertions, 24 deletions
diff --git a/railties/guides/source/active_support_core_extensions.textile b/railties/guides/source/active_support_core_extensions.textile
index 2ae336fa15..e912de974a 100644
--- a/railties/guides/source/active_support_core_extensions.textile
+++ b/railties/guides/source/active_support_core_extensions.textile
@@ -772,30 +772,6 @@ Absolute qualified constant names like +::Math::PI+ raise +NameError+.
NOTE: Defined in +active_support/core_ext/module/qualified_const.rb+.
-h4. Synchronization
-
-The +synchronize+ macro declares a method to be synchronized:
-
-<ruby>
-class Counter
- @@mutex = Mutex.new
- attr_reader :value
-
- def initialize
- @value = 0
- end
-
- def incr
- @value += 1 # non-atomic
- end
- synchronize :incr, :with => '@@mutex'
-end
-</ruby>
-
-The method receives the name of an action, and a +:with+ option with code. The code is evaluated in the context of the receiver each time the method is invoked, and it should evaluate to a +Mutex+ instance or any other object that responds to +synchronize+ and accepts a block.
-
-NOTE: Defined in +active_support/core_ext/module/synchronization.rb+.
-
h4. Reachable
A named module is reachable if it is stored in its corresponding constant. It means you can reach the module object via the constant.