Class: Concurrent::Edge::LockFreeLinkedSet::Tail — Concurrent

Class List Method List File List

# Class: Concurrent::Edge::LockFreeLinkedSet::Tail

Inherits:
  Node
  - Object
  - Synchronization::Object
  - Node
  - Concurrent::Edge::LockFreeLinkedSet::Tail
  show all
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 Method Summary (collapse)

- - (undocumented) <=>(_other)

  Always greater than other nodes.

- - (Tail) initialize(_data = nil, _succ = nil) constructor

  A new instance of Tail.

## Constructor Details

### - (`Tail`) initialize(_data = nil, _succ = nil)

Returns a new instance of Tail

    60
    61
    62
    # File 'lib/concurrent/edge/lock_free_linked_set/node.rb', line 60

    def initialize(_data = nil, _succ = nil)
      @SuccessorReference = AtomicMarkableReference.new self
    end

## Instance Method Details

### - (`undocumented`) <=>(_other)

Always greater than other nodes. This means that traversal will end at the tail node since we are comparing node size in the traversal.

    66
    67
    68
    # File 'lib/concurrent/edge/lock_free_linked_set/node.rb', line 66

    def <=>(_other)
      1
    end