### Home Classes Methods

### In Files

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

### Namespace

- MODULE ThreadSafe::Util
- CLASS ThreadSafe::Array
- CLASS ThreadSafe::AtomicReferenceCacheBackend
- CLASS ThreadSafe::Cache
- CLASS ThreadSafe::Hash
- CLASS ThreadSafe::MriCacheBackend
- CLASS ThreadSafe::NonConcurrentCacheBackend
- CLASS ThreadSafe::SynchronizedCacheBackend

### Methods

- ::allocate
- #_mon_initialize

### Class/Module Index

Quicksearch

- ThreadSafe
- ThreadSafe::Array
- ThreadSafe::AtomicReferenceCacheBackend
- ThreadSafe::AtomicReferenceCacheBackend::Node
- ThreadSafe::AtomicReferenceCacheBackend::Table
- ThreadSafe::Cache
- ThreadSafe::Hash
- ThreadSafe::MriCacheBackend
- ThreadSafe::NonConcurrentCacheBackend
- ThreadSafe::SynchronizedCacheBackend
- ThreadSafe::Util
- ThreadSafe::Util::Adder
- ThreadSafe::Util::CheapLockable
- ThreadSafe::Util::PowerOfTwoTuple
- ThreadSafe::Util::Striped64
- ThreadSafe::Util::Striped64::Cell
- ThreadSafe::Util::Volatile
- ThreadSafe::Util::VolatileTuple
- ThreadSafe::Util::XorShiftRandom
- SynchronizedDelegator
- Threadsafe

No matching classes.

# ThreadSafe

### Constants

Array

  Because MRI never runs code in parallel, the existing non-thread-safe structures should usually work fine.

ConcurrentCacheBackend
Hash
NULL

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

VERSION

### Public Class Methods

allocate() click to toggle source

    # File lib/thread_safe.rb, line 49
    def self.allocate
      obj = super
      obj.send(:_mon_initialize)
      obj
    end

### Public Instance Methods

_mon_initialize() click to toggle source

    # File lib/thread_safe.rb, line 45
    def _mon_initialize
      @_monitor = Monitor.new unless @_monitor # avoid double initialisation
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.