1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activesupport/lib/active_support/concurrency/latch.rb
2015-11-04 21:12:28 -05:00

19 lines
441 B
Ruby

require 'concurrent/atomic/count_down_latch'
module ActiveSupport
module Concurrency
class Latch < Concurrent::CountDownLatch
def initialize(count = 1)
ActiveSupport::Deprecation.warn("ActiveSupport::Concurrency::Latch is deprecated. Please use Concurrent::CountDownLatch instead.")
super(count)
end
alias_method :release, :count_down
def await
wait(nil)
end
end
end
end