Class: Moneta::Mutex
- Inherits:
-
SynchronizePrimitive
- Object
- SynchronizePrimitive
- Moneta::Mutex
- Defined in:
- lib/moneta/synchronize.rb
Overview
Distributed/shared store-wide mutex
Instance Method Summary collapse
-
#initialize(store, lock) ⇒ Mutex
constructor
A new instance of Mutex.
Methods inherited from SynchronizePrimitive
#enter, #leave, #locked?, #synchronize, #try_enter
Constructor Details
#initialize(store, lock) ⇒ Mutex
Returns a new instance of Mutex.
69 70 71 72 |
# File 'lib/moneta/synchronize.rb', line 69 def initialize(store, lock) raise 'Store must support feature :create' unless store.supports?(:create) @store, @lock = store, lock end |