Class: Concurrent::Edge::LockFreeLinkedSet::Tail
- Inherits:
-
Node
- Object
- Synchronization::Object
- Node
- Concurrent::Edge::LockFreeLinkedSet::Tail
- Defined in:
- lib/concurrent/edge/lock_free_linked_set/node.rb
Overview
Internal sentinel node for the Tail. It is always greater than all other nodes, and it is self-referential; meaning its successor is a self-loop.
Instance Attribute Summary
Attributes inherited from Node
#Data, #Key, #Successor_reference
Instance Method Summary collapse
-
#<=>(_other) ⇒ Object
Always greater than other nodes.
-
#initialize(_data = nil, _succ = nil) ⇒ Tail
constructor
A new instance of Tail.
Methods inherited from Node
Constructor Details
#initialize(_data = nil, _succ = nil) ⇒ Tail
Returns a new instance of Tail.
51 52 53 |
# File 'lib/concurrent/edge/lock_free_linked_set/node.rb', line 51 def initialize(_data = nil, _succ = nil) @Successor_reference = AtomicMarkableReference.new self end |
Instance Method Details
#<=>(_other) ⇒ Object
Always greater than other nodes. This means that traversal will end at the tail node since we are comparing node size in the traversal.
57 58 59 |
# File 'lib/concurrent/edge/lock_free_linked_set/node.rb', line 57 def <=>(_other) 1 end |