Class: Libhoney::Queueing::QLock
- Inherits:
-
Object
- Object
- Libhoney::Queueing::QLock
- Defined in:
- lib/libhoney/queueing/sized_queue_with_timeout.rb
Instance Attribute Summary collapse
-
#mutex ⇒ Object
readonly
Returns the value of attribute mutex.
Instance Method Summary collapse
-
#initialize ⇒ QLock
constructor
A new instance of QLock.
- #synchronize(&block) ⇒ Object
Constructor Details
#initialize ⇒ QLock
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
#mutex ⇒ Object (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 |