Sha256: 9e3015be8e109b75dc73ccb457f77cb10a241cb1fd40bffc92b823297cdcb6b2
Contents?: true
Size: 775 Bytes
Versions: 19
Compression:
Stored size: 775 Bytes
Contents
require 'concurrent/utility/native_extension_loader' # load native part first module Concurrent module Synchronization if Concurrent.on_jruby? # @!visibility private # @!macro internal_implementation_note class JavaObject < AbstractObject def self.attr_volatile(*names) names.each do |name| ivar = :"@volatile_#{name}" class_eval <<-RUBY, __FILE__, __LINE__ + 1 def #{name} instance_variable_get_volatile(:#{ivar}) end def #{name}=(value) instance_variable_set_volatile(:#{ivar}, value) end RUBY end names.map { |n| [n, :"#{n}="] }.flatten end end end end end
Version data entries
19 entries across 17 versions & 5 rubygems