Module: Vigilem::Core::LockablePipelineComponent
- Included in:
- Adapters::Adapter, InputSystemHandler
- Defined in:
- lib/vigilem/core/lockable_pipeline_component.rb
Instance Method Summary collapse
-
#semaphore ⇒ Object
name collision with demultiplexer and bufferhandler.
-
#semaphore! ⇒ Object
checks #source component for #semaphore without memoization.
- #synchronize ⇒ Object
Instance Method Details
#semaphore ⇒ Object
name collision with demultiplexer and bufferhandler
10 11 12 |
# File 'lib/vigilem/core/lockable_pipeline_component.rb', line 10 def semaphore @semaphore ||= (semaphore! || Monitor.new) end |
#semaphore! ⇒ Object
checks #source component for #semaphore without memoization
16 17 18 |
# File 'lib/vigilem/core/lockable_pipeline_component.rb', line 16 def semaphore! self.respond.source.respond.semaphore end |
#synchronize ⇒ Object
22 23 24 25 26 |
# File 'lib/vigilem/core/lockable_pipeline_component.rb', line 22 def synchronize semaphore.synchronize do yield end end |