class ActiveSupport::Concurrency::Latch
Public Class Methods
new(count = 1)
click to toggle source
# 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
Public Instance Methods
await()
click to toggle source
# File lib/active_support/concurrency/latch.rb, line 21 def await @inner.wait(nil) end
release()
click to toggle source
# File lib/active_support/concurrency/latch.rb, line 17 def release @inner.count_down end