Module: When::Parts::Resource::Synchronize
- Included in:
- When::Parts::Resource, Pool
- Defined in:
- lib/when_exe/parts/resource.rb
Instance Method Summary collapse
-
#synchronize ⇒ Object
排他実行.
Instance Method Details
#synchronize ⇒ Object
排他実行
与えられたブロックを必要なら排他制御をして実行する
45 46 47 48 49 50 51 52 53 |
# File 'lib/when_exe/parts/resource.rb', line 45 def synchronize if @_lock_ @_lock_.synchronize do yield end else yield end end |