Class: Madeleine::DefaultLock
- Inherits:
-
Object
- Object
- Madeleine::DefaultLock
- Defined in:
- lib/madeleine.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#initialize ⇒ DefaultLock
constructor
:nodoc:.
- #synchronize(&block) ⇒ Object
- #synchronize_shared(&block) ⇒ Object
Constructor Details
#initialize ⇒ DefaultLock
:nodoc:
173 174 175 |
# File 'lib/madeleine.rb', line 173 def initialize @lock = Sync.new end |
Instance Method Details
#synchronize(&block) ⇒ Object
177 178 179 |
# File 'lib/madeleine.rb', line 177 def synchronize(&block) @lock.synchronize(&block) end |
#synchronize_shared(&block) ⇒ Object
181 182 183 |
# File 'lib/madeleine.rb', line 181 def synchronize_shared(&block) @lock.synchronize(:SH, &block) end |