123456789_123456789_123456789_123456789_123456789_

Class: Concurrent::Synchronization::MonitorLockableObject

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

.newMonitorLockableObject

[ GitHub ]

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

def initialize
  super()
  @__Lock__      = ::Monitor.new
  @__Condition__ = @__Lock__.new_cond
end

Instance Method Details

#initialize_copy(other)

[ GitHub ]

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

def initialize_copy(other)
  super
  @__Lock__      = ::Monitor.new
  @__Condition__ = @__Lock__.new_cond
end