Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deprecated Concurrent::Atomic in lieu of Concurrent::AtomicReference.
- Loading branch information
Showing
17 changed files
with
201 additions
and
171 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
require 'concurrent/native_extensions' | ||
require 'concurrent/utility/engine' | ||
require 'concurrent/atomic_reference/concurrent_update_error' | ||
require 'concurrent/atomic_reference/mutex_atomic' | ||
|
||
begin | ||
# force fallback impl with FORCE_ATOMIC_FALLBACK=1 | ||
if /[^0fF]/ =~ ENV['FORCE_ATOMIC_FALLBACK'] | ||
ruby_engine = 'mutex_atomic' | ||
else | ||
ruby_engine = Concurrent.ruby_engine | ||
end | ||
|
||
require "concurrent/atomic_reference/#{ruby_engine}" | ||
rescue LoadError | ||
#warn 'Compiled extensions not installed, pure Ruby Atomic will be used.' | ||
end | ||
|
||
if defined? Concurrent::JavaAtomicReference | ||
|
||
# @!macro atomic_reference | ||
class Concurrent::AtomicReference < Concurrent::JavaAtomicReference | ||
end | ||
|
||
elsif defined? Concurrent::RbxAtomicReference | ||
|
||
# @!macro atomic_reference | ||
class Concurrent::AtomicReference < Concurrent::RbxAtomicReference | ||
end | ||
|
||
elsif defined? Concurrent::CAtomicReference | ||
|
||
# @!macro atomic_reference | ||
class Concurrent::AtomicReference < Concurrent::CAtomicReference | ||
end | ||
|
||
else | ||
|
||
# @!macro atomic_reference | ||
class Concurrent::AtomicReference < Concurrent::MutexAtomicReference | ||
end | ||
end | ||
|
||
module Concurrent | ||
|
||
# @see Concurrent::AtomicReference | ||
# @deprecated Use Concurrent::AtomicReference instead. | ||
Atomic = AtomicReference | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
require 'concurrent/atomic' | ||
|
||
module Concurrent | ||
|
||
# @!macro [attach] abstract_thread_local_var | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.