Distributed/shared store-wide mutex
@example Use `Moneta::Mutex`
mutex = Moneta::Mutex.new(store, 'mutex') mutex.synchronize do # Synchronized access store['counter'] += 1 end
@api public
@param [Moneta store] store The store we want to lock @param [Object] lock Key of the lock entry
# File lib/moneta/synchronize.rb, line 76 def initialize(store, lock) raise 'Store must support feature :create' unless store.supports?(:create) @store, @lock = store, lock end
Generated with the Darkfish Rdoc Generator 2.