1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
module Concurrent
module Synchronization
module TruffleAttrVolatile
def self.included(base)
base.extend(ClassMethods)
end
module ClassMethods
def attr_volatile(*names)
# TODO may not always be available
attr_atomic(*names)
end
end
def full_memory_barrier
Truffle::System.full_memory_barrier
end
end
# @!visibility private
# @!macro internal_implementation_note
class TruffleObject < AbstractObject
include TruffleAttrVolatile
def initialize
# nothing to do
end
end
end
end
|