123456789_123456789_123456789_123456789_123456789_

Class: Concurrent::RubyExchanger::Node

Class Attribute Summary

Class Method Summary

Synchronization::Object - Inherited

.atomic_attribute?, .atomic_attributes,
.attr_atomic

Creates methods for reading and writing to a instance variable with volatile (Java) semantic as .attr_volatile does.

.attr_volatile

Creates methods for reading and writing (as attr_accessor does) to a instance variable with volatile (Java) semantic.

.ensure_safe_initialization_when_final_fields_are_present

For testing purposes, quite slow.

.new

Has to be called by children.

.safe_initialization!, .define_initialize_atomic_fields

Synchronization::AbstractObject - Inherited

Instance Method Summary

Constructor Details

.new(item) ⇒ Node

[ GitHub ]

  
# File 'lib/concurrent-ruby/concurrent/exchanger.rb', line 142

def initialize(item)
  super()
  @Item      = item
  @Latch     = Concurrent::CountDownLatch.new
  self.value = nil
end

Instance Method Details

#item

[ GitHub ]

  
# File 'lib/concurrent-ruby/concurrent/exchanger.rb', line 153

def item
  @Item
end

#latch

[ GitHub ]

  
# File 'lib/concurrent-ruby/concurrent/exchanger.rb', line 149

def latch
  @Latch
end