Class: ActiveSupport::Concurrency::Latch
- Defined in:
- lib/active_support/concurrency/latch.rb
Instance Method Summary collapse
- #await ⇒ Object
-
#initialize(count = 1) ⇒ Latch
constructor
A new instance of Latch.
- #release ⇒ Object
Constructor Details
#initialize(count = 1) ⇒ Latch
Returns a new instance of Latch.
7 8 9 10 11 12 13 14 15 |
# File 'lib/active_support/concurrency/latch.rb', line 7 def initialize(count = 1) if count == 1 ActiveSupport::Deprecation.warn("ActiveSupport::Concurrency::Latch is deprecated. Please use Concurrent::Event instead.") else ActiveSupport::Deprecation.warn("ActiveSupport::Concurrency::Latch is deprecated. Please use Concurrent::CountDownLatch instead.") end @inner = Concurrent::CountDownLatch.new(count) end |