Class: Concurrent::DependencyCounter
Do not use. This class is for internal use only.
Relationships & Source Files | |
Inherits: | Object |
Defined in: | lib/concurrent-ruby/concurrent/dataflow.rb |
Class Method Summary
- .new(count, &block) ⇒ DependencyCounter constructor
Instance Method Summary
Constructor Details
.new(count, &block) ⇒ DependencyCounter
# File 'lib/concurrent-ruby/concurrent/dataflow.rb', line 9
def initialize(count, &block) @counter = AtomicFixnum.new(count) @block = block end
Instance Method Details
#update(time, value, reason)
[ GitHub ]# File 'lib/concurrent-ruby/concurrent/dataflow.rb', line 14
def update(time, value, reason) if @counter.decrement == 0 @block.call end end