@@ -17,33 +17,33 @@ def initialize(value = nil)
1717
1818 # @!macro [attach] atomic_reference_method_get
1919 #
20- # Gets the current value.
20+ # Gets the current value.
2121 #
22- # @return [Object] the current value
22+ # @return [Object] the current value
2323 def get
2424 @mutex . synchronize { @value }
2525 end
2626 alias_method :value , :get
2727
2828 # @!macro [attach] atomic_reference_method_set
2929 #
30- # Sets to the given value.
30+ # Sets to the given value.
3131 #
32- # @param [Object] new_value the new value
32+ # @param [Object] new_value the new value
3333 #
34- # @return [Object] the new value
34+ # @return [Object] the new value
3535 def set ( new_value )
3636 @mutex . synchronize { @value = new_value }
3737 end
3838 alias_method :value= , :set
3939
4040 # @!macro [attach] atomic_reference_method_get_and_set
4141 #
42- # Atomically sets to the given value and returns the old value.
42+ # Atomically sets to the given value and returns the old value.
4343 #
44- # @param [Object] new_value the new value
44+ # @param [Object] new_value the new value
4545 #
46- # @return [Object] the old value
46+ # @return [Object] the old value
4747 def get_and_set ( new_value )
4848 @mutex . synchronize do
4949 old_value = @value
@@ -55,14 +55,14 @@ def get_and_set(new_value)
5555
5656 # @!macro [attach] atomic_reference_method_compare_and_set
5757 #
58- # Atomically sets the value to the given updated value if
59- # the current value == the expected value.
58+ # Atomically sets the value to the given updated value if
59+ # the current value == the expected value.
6060 #
61- # @param [Object] old_value the expected value
62- # @param [Object] new_value the new value
61+ # @param [Object] old_value the expected value
62+ # @param [Object] new_value the new value
6363 #
64- # @return [Boolean] `true` if successful. A `false` return indicates
65- # that the actual value was not equal to the expected value.
64+ # @return [Boolean] `true` if successful. A `false` return indicates
65+ # that the actual value was not equal to the expected value.
6666 def _compare_and_set ( old_value , new_value ) #:nodoc:
6767 return false unless @mutex . try_lock
6868 begin
0 commit comments