Class: Concurrent::LockFreeQueue::Node

Inherits:
Synchronization::Object
  • Object
show all
Defined in:
lib/concurrent-ruby-edge/concurrent/edge/lock_free_queue.rb

Instance Method Summary collapse

Constructor Details

#initialize(item, successor) ⇒ Node

Returns a new instance of Node.



11
12
13
14
15
16
# File 'lib/concurrent-ruby-edge/concurrent/edge/lock_free_queue.rb', line 11

def initialize(item, successor)
  super()
  # published through queue, no need to be volatile or final
  @Item          = item
  self.successor = successor
end

Instance Method Details

#itemObject



18
19
20
# File 'lib/concurrent-ruby-edge/concurrent/edge/lock_free_queue.rb', line 18

def item
  @Item
end