Class: Libhoney::Queueing::QLock

Inherits:
Object
  • Object
show all
Defined in:
lib/libhoney/queueing/sized_queue_with_timeout.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeQLock

Returns a new instance of QLock.



167
168
169
# File 'lib/libhoney/queueing/sized_queue_with_timeout.rb', line 167

def initialize
  @mutex = Mutex.new
end

Instance Attribute Details

#mutexObject (readonly)

Returns the value of attribute mutex.



165
166
167
# File 'lib/libhoney/queueing/sized_queue_with_timeout.rb', line 165

def mutex
  @mutex
end

Instance Method Details

#synchronize(&block) ⇒ Object



171
172
173
# File 'lib/libhoney/queueing/sized_queue_with_timeout.rb', line 171

def synchronize(&block)
  @mutex.synchronize(&block)
end