Module: ThreadSafe

Defined in:
lib/thread_safe.rb,
lib/thread_safe/util.rb,
lib/thread_safe/cache.rb,
lib/thread_safe/version.rb,
lib/thread_safe/util/adder.rb,
lib/thread_safe/util/volatile.rb,
lib/thread_safe/util/striped64.rb,
lib/thread_safe/mri_cache_backend.rb,
lib/thread_safe/util/cheap_lockable.rb,
lib/thread_safe/util/volatile_tuple.rb,
lib/thread_safe/util/atomic_reference.rb,
lib/thread_safe/util/xor_shift_random.rb,
lib/thread_safe/util/power_of_two_tuple.rb,
lib/thread_safe/synchronized_cache_backend.rb,
lib/thread_safe/non_concurrent_cache_backend.rb,
lib/thread_safe/atomic_reference_cache_backend.rb

Defined Under Namespace

Modules: Util Classes: Array, AtomicReferenceCacheBackend, Cache, Hash, MriCacheBackend, NonConcurrentCacheBackend, SynchronizedCacheBackend

Constant Summary collapse

NULL =

Various classes within allows for +nil+ values to be stored, so a special +NULL+ token is required to indicate the "nil-ness".

Object.new
ConcurrentCacheBackend =
if defined?(RUBY_ENGINE)
  case RUBY_ENGINE
  when 'jruby'; JRubyCacheBackend
  when 'ruby';  MriCacheBackend
  when 'rbx';   AtomicReferenceCacheBackend
  else
    warn 'ThreadSafe: unsupported Ruby engine, using a fully synchronized ThreadSafe::Cache implementation' if $VERBOSE
    SynchronizedCacheBackend
  end
else
  MriCacheBackend
end
VERSION =
"0.3.6"