Permalink
Browse files

Remove deprecated class ActiveSupport::Concurrency::Latch

  • Loading branch information...
pixeltrix committed Nov 14, 2016
1 parent 0189f4d commit 0d7bd2031b4054fbdeab0a00dd58b1b08fb7fea6
Showing with 4 additions and 25 deletions.
  1. +4 −0 activesupport/CHANGELOG.md
  2. +0 −25 activesupport/lib/active_support/concurrency/latch.rb
@@ -1,3 +1,7 @@
* Remove deprecated class `ActiveSupport::Concurrency::Latch`
*Andrew White*
* Remove deprecated separator argument from `parameterize`
*Andrew White*
@@ -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

0 comments on commit 0d7bd20

Please sign in to comment.