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:
167 168 169 |
# File 'lib/madeleine.rb', line 167 def initialize @lock = Sync.new end |
Instance Method Details
#synchronize(&block) ⇒ Object
171 172 173 |
# File 'lib/madeleine.rb', line 171 def synchronize(&block) @lock.synchronize(&block) end |
#synchronize_shared(&block) ⇒ Object
175 176 177 |
# File 'lib/madeleine.rb', line 175 def synchronize_shared(&block) @lock.synchronize(:SH, &block) end |