Sha256: acc3623ac4989b1d273594b0af8644825741fab21e4e8c0ae64320d6fb5dd567

Contents?: true

Size: 1.27 KB

Versions: 31

Compression:

Stored size: 1.27 KB

Contents

require 'concurrent/synchronization'
require 'concurrent/utility/engine'
require 'concurrent/atomic_reference/concurrent_update_error'
require 'concurrent/atomic_reference/mutex_atomic'

begin
  # force fallback impl with FORCE_ATOMIC_FALLBACK=1
  if /[^0fF]/ =~ ENV['FORCE_ATOMIC_FALLBACK']
    ruby_engine = 'mutex_atomic'
  else
    ruby_engine = Concurrent.ruby_engine
  end

  require "concurrent/atomic_reference/#{ruby_engine}"
rescue LoadError
  #warn 'Compiled extensions not installed, pure Ruby Atomic will be used.'
end

if defined? Concurrent::JavaAtomicReference

  # @!macro atomic_reference
  class Concurrent::AtomicReference < Concurrent::JavaAtomicReference
  end

elsif defined? Concurrent::RbxAtomicReference

  # @!macro atomic_reference
  class Concurrent::AtomicReference < Concurrent::RbxAtomicReference
  end

elsif defined? Concurrent::CAtomicReference

  # @!macro atomic_reference
  class Concurrent::AtomicReference < Concurrent::CAtomicReference
  end

else

  # @!macro atomic_reference
  class Concurrent::AtomicReference < Concurrent::MutexAtomicReference
  end
end

class Concurrent::AtomicReference
  # @return [String] Short string representation.
  def to_s
    format '<#%s:0x%x value:%s>', self.class, object_id << 1, get
  end

  alias_method :inspect, :to_s
end

Version data entries

31 entries across 28 versions & 9 rubygems

Version Path
tdiary-5.0.11 vendor/bundle/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/atomic_reference.rb
sprokovuln-0.2.0 vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/atomic_reference.rb
logstash-filter-device_detection-1.0.7-java vendor/bundle/jruby/1.9/gems/concurrent-ruby-1.0.5-java/lib/concurrent/atomic/atomic_reference.rb
tdiary-5.0.9 vendor/bundle/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/atomic_reference.rb
monero_wallet_gen-0.1.0 vendor/bundle/ruby/2.3.0/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/atomic_reference.rb
tdiary-5.0.8 vendor/bundle/gems/tdiary-5.0.7/vendor/bundle/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/atomic_reference.rb
tdiary-5.0.8 vendor/bundle/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/atomic_reference.rb
tdiary-5.0.8 vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/atomic_reference.rb
tdiary-5.0.7 vendor/bundle/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/atomic_reference.rb
pract6-0.1.0 .gem/ruby/2.3.0/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/atomic_reference.rb
tdiary-5.0.6 vendor/bundle/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/atomic_reference.rb
logstash-filter-cache-redis-0.3.1 vendor/bundle/jruby/1.9/gems/concurrent-ruby-1.0.5-java/lib/concurrent/atomic/atomic_reference.rb
logstash-filter-cache-redis-0.3.0 vendor/bundle/jruby/1.9/gems/concurrent-ruby-1.0.5-java/lib/concurrent/atomic/atomic_reference.rb
logstash-filter-cache-redis-0.2.0 vendor/bundle/jruby/1.9/gems/concurrent-ruby-1.0.5-java/lib/concurrent/atomic/atomic_reference.rb
tdiary-5.0.5 vendor/bundle/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/atomic_reference.rb
tdiary-5.0.5 vendor/bundle/gems/tdiary-5.0.4/vendor/bundle/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/atomic_reference.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/atomic_reference.rb
lazy_record-0.2.1 vendor/bundle/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/atomic_reference.rb
lazy_record-0.2.0 vendor/bundle/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/atomic_reference.rb
lazy_record-0.1.9 vendor/bundle/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/atomic_reference.rb