File tree Expand file tree Collapse file tree 1 file changed +14
-17
lines changed Expand file tree Collapse file tree 1 file changed +14
-17
lines changed Original file line number Diff line number Diff line change 1+ #####################################################################
2+ # Attempt to check for the deprecated ruby-atomic gem and warn the
3+ # user that they should use the new implementation instead.
4+
5+ if defined? ( Atomic )
6+ warn <<-RUBY
7+ [ATOMIC] Detected an `Atomic` class, which may indicate a dependency
8+ on the ruby-atomic gem. That gem has been deprecated and merged into
9+ the concurrent-ruby gem. Please use the Concurrent::Atomic class for
10+ atomic references and not the Atomic class.
11+ RUBY
12+ end
13+ #####################################################################
14+
115require 'concurrent/atomic_reference/concurrent_update_error'
216require 'concurrent/atomic_reference/mutex_atomic'
317
@@ -75,20 +89,3 @@ class Concurrent::Atomic < Concurrent::CAtomic
7589 class Concurrent ::Atomic < Concurrent ::MutexAtomic
7690 end
7791end
78-
79- # @!macro atomic_reference
80- class Atomic < Concurrent ::Atomic
81-
82- # @!macro concurrent_update_error
83- ConcurrentUpdateError = Class . new ( Concurrent ::ConcurrentUpdateError )
84-
85- # @!macro [attach] atomic_reference_method_initialize
86- #
87- # Creates a new Atomic reference with null initial value.
88- #
89- # @param [Object] value the initial value
90- def initialize ( value )
91- warn "[DEPRECATED] Please use Concurrent::Atomic instead."
92- super
93- end
94- end
You can’t perform that action at this time.
0 commit comments