Class: Madeleine::DefaultLock

Inherits:
Object
  • Object
show all
Defined in:
lib/madeleine.rb

Overview

:nodoc:

Instance Method Summary collapse

Constructor Details

#initializeDefaultLock

: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