Class: ThreadSafe::MriCacheBackend

Inherits:
Object
  • Object
show all
Defined in:
lib/thread_hazardous/mri_cache_backend.rb

Instance Method Summary collapse

Instance Method Details

#each_pairObject

The original implementation duplicate the ‘@backend` Hash so it do not have to lock during the full iteration



11
12
13
14
15
16
# File 'lib/thread_hazardous/mri_cache_backend.rb', line 11

def each_pair
  @backend.each_pair do |k, v|
    yield k, v
  end
  self
end