123456789_123456789_123456789_123456789_123456789_

Class: Concurrent::Synchronization::MutexLockableObject

Overview

Note:

**Private Implementation:** This abstraction is a private, internal implementation detail. It should never be used directly.

Class Attribute Summary

Class Method Summary

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 does.

.attr_volatile

Creates methods for reading and writing (as attr_accessor does) to a instance variable with volatile (Java) semantic.

.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

AbstractObject - Inherited

Instance Method Summary

Constructor Details

.newMutexLockableObject

[ GitHub ]

  
# File 'lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb', line 30

def initialize
  super()
  @__Lock__      = ::Mutex.new
  @__Condition__ = ::ConditionVariable.new
end

Instance Method Details

#initialize_copy(other)

[ GitHub ]

  
# File 'lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb', line 36

def initialize_copy(other)
  super
  @__Lock__      = ::Mutex.new
  @__Condition__ = ::ConditionVariable.new
end