Class: Concurrent::LockFreeQueue::Node
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
|
|
Instance Chain:
|
|
Inherits: |
Concurrent::Synchronization::Object
|
Defined in: | lib/concurrent-ruby-edge/concurrent/edge/lock_free_queue.rb |
Class Attribute Summary
Synchronization::Object
- Inherited
Class Method Summary
- .new(item, successor) ⇒ Node constructor
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 | Creates methods for reading and writing (as |
.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
-
#compare_and_set_successor(expected_successor, new_successor) ⇒ true, false
Sets the successor to new_successor if the current successor is expected_successor.
- #item
- #successor ⇒ Object
-
#successor=(new_successor) ⇒ Object
Set
the successor. -
#swap_successor(new_successor) ⇒ Object
Set
the successor to new_successor and return the old successor. -
#update_successor {|Object| ... } ⇒ Object
Updates the successor using the block.
Synchronization::Object
- Inherited
Synchronization::Volatile
- Included
Synchronization::AbstractObject
- Inherited
Constructor Details
.new(item, successor) ⇒ Node
Instance Method Details
#compare_and_set_successor(expected_successor, new_successor) ⇒ true
, false
Sets the successor to new_successor if the current successor is expected_successor
# File 'lib/concurrent-ruby-edge/concurrent/edge/lock_free_queue.rb', line 9
attr_atomic :successor
#item
[ GitHub ]# File 'lib/concurrent-ruby-edge/concurrent/edge/lock_free_queue.rb', line 18
def item @Item end
#successor ⇒ Object
# File 'lib/concurrent-ruby-edge/concurrent/edge/lock_free_queue.rb', line 9
attr_atomic :successor
#successor=(new_successor) ⇒ Object
Set
the successor.
# File 'lib/concurrent-ruby-edge/concurrent/edge/lock_free_queue.rb', line 9
attr_atomic :successor
#swap_successor(new_successor) ⇒ Object
Set
the successor to new_successor and return the old successor.
# File 'lib/concurrent-ruby-edge/concurrent/edge/lock_free_queue.rb', line 9
attr_atomic :successor
#update_successor {|Object| ... } ⇒ Object
Updates the successor using the block.
# File 'lib/concurrent-ruby-edge/concurrent/edge/lock_free_queue.rb', line 9
attr_atomic :successor