Class: Concurrent::LockFreeStack::Node

Inherits:
Object
  • Object
show all
Defined in:
lib/concurrent/edge/lock_free_stack.rb

Direct Known Subclasses

Empty

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value, next_node) ⇒ Node

Returns a new instance of Node.



13
14
15
16
# File 'lib/concurrent/edge/lock_free_stack.rb', line 13

def initialize(value, next_node)
  @value     = value
  @next_node = next_node
end

Instance Attribute Details

#next_nodeObject (readonly)

TODO (pitr-ch 20-Dec-2016): Could be unified with Stack class?



9
10
11
# File 'lib/concurrent/edge/lock_free_stack.rb', line 9

def next_node
  @next_node
end

#valueObject

TODO (pitr-ch 20-Dec-2016): Could be unified with Stack class?



9
10
11
# File 'lib/concurrent/edge/lock_free_stack.rb', line 9

def value
  @value
end