From 0d7bd2031b4054fbdeab0a00dd58b1b08fb7fea6 Mon Sep 17 00:00:00 2001 From: Andrew White Date: Mon, 14 Nov 2016 12:44:19 +0000 Subject: Remove deprecated class ActiveSupport::Concurrency::Latch --- .../lib/active_support/concurrency/latch.rb | 25 ---------------------- 1 file changed, 25 deletions(-) delete mode 100644 activesupport/lib/active_support/concurrency/latch.rb (limited to 'activesupport/lib') diff --git a/activesupport/lib/active_support/concurrency/latch.rb b/activesupport/lib/active_support/concurrency/latch.rb deleted file mode 100644 index 53e09b685c..0000000000 --- a/activesupport/lib/active_support/concurrency/latch.rb +++ /dev/null @@ -1,25 +0,0 @@ -require "concurrent/atomic/count_down_latch" - -module ActiveSupport - module Concurrency - class Latch - 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 - - def release - @inner.count_down - end - - def await - @inner.wait(nil) - end - end - end -end -- cgit v1.2.3