Class: Madeleine::DefaultLock

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

Overview

:nodoc:

Instance Method Summary collapse

Constructor Details

#initializeDefaultLock

: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