Class: JRL::Concurrent::Latch
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- JRL::Concurrent::Latch
- Defined in:
- lib/jretlang/latch.rb
Instance Method Summary collapse
- #await(time, time_unit = JRL::Concurrent::TimeUnit::SECONDS) ⇒ Object
-
#initialize(count) ⇒ Latch
constructor
A new instance of Latch.
Constructor Details
#initialize(count) ⇒ Latch
Returns a new instance of Latch.
2 3 4 5 |
# File 'lib/jretlang/latch.rb', line 2 def initialize( count ) @l = JRL::Concurrent::CountDownLatch.new( count ) super( @l ) end |
Instance Method Details
#await(time, time_unit = JRL::Concurrent::TimeUnit::SECONDS) ⇒ Object
7 8 9 |
# File 'lib/jretlang/latch.rb', line 7 def await( time, time_unit = JRL::Concurrent::TimeUnit::SECONDS ) @l.await( time, time_unit ) end |