| Class | Moneta::Mutex |
| In: |
lib/moneta/synchronize.rb
|
| Parent: | SynchronizePrimitive |
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