Method: Concurrent::AtomicReference#update
- Defined in:
- lib/concurrent-ruby/concurrent/atomic/atomic_reference.rb
#update {|Object| ... } ⇒ Object
Pass the current value to the given block, replacing it with the block’s result. May retry if the value changes during the block’s execution.
196 197 198 199 200 201 202 203 204 |
# File 'lib/concurrent-ruby/concurrent/atomic/atomic_reference.rb', line 196 class AtomicReference < AtomicReferenceImplementation # @return [String] Short string representation. def to_s format '%s value:%s>', super[0..-2], get end alias_method :inspect, :to_s end |