Module: Laziest::MutexUtil
- Defined in:
- lib/laziest/mutex_util.rb
Class Method Summary collapse
-
.unsynchronize(mutex) ⇒ Object
opposite of Mutex#synchronize.
Class Method Details
.unsynchronize(mutex) ⇒ Object
opposite of Mutex#synchronize.
4 5 6 7 8 9 10 11 |
# File 'lib/laziest/mutex_util.rb', line 4 def self.unsynchronize mutex mutex.unlock begin yield ensure mutex.lock end end |