Class: Higgs::ReadWriteLock::ChildLock
- Inherits:
-
Object
- Object
- Higgs::ReadWriteLock::ChildLock
- Defined in:
- lib/higgs/thread.rb
Instance Method Summary collapse
-
#initialize(rw_lock) ⇒ ChildLock
constructor
A new instance of ChildLock.
- #synchronize ⇒ Object
Constructor Details
#initialize(rw_lock) ⇒ ChildLock
Returns a new instance of ChildLock.
380 381 382 |
# File 'lib/higgs/thread.rb', line 380 def initialize(rw_lock) @rw_lock = rw_lock end |
Instance Method Details
#synchronize ⇒ Object
384 385 386 387 388 389 390 391 392 |
# File 'lib/higgs/thread.rb', line 384 def synchronize lock begin r = yield ensure unlock end r end |