diff options
author | Jerry D'Antonio <stumpjumper@gmail.com> | 2015-09-19 09:56:26 -0400 |
---|---|---|
committer | Jerry D'Antonio <stumpjumper@gmail.com> | 2015-09-19 09:56:26 -0400 |
commit | 56ac6e4768adb1f7055474d40a9e921380559c43 (patch) | |
tree | 01e085d38060f8739944177d6001c6996b6fc779 /activerecord/lib/active_record/type/type_map.rb | |
parent | 0c39a022b0b432afff240c5624dadee00da8d175 (diff) | |
download | rails-56ac6e4768adb1f7055474d40a9e921380559c43.tar.gz rails-56ac6e4768adb1f7055474d40a9e921380559c43.tar.bz2 rails-56ac6e4768adb1f7055474d40a9e921380559c43.zip |
Replaced `ThreadSafe::Map` with successor `Concurrent::Map`.
The thread_safe gem is being deprecated and all its code has been merged
into the concurrent-ruby gem. The new class, Concurrent::Map, is exactly
the same as its predecessor except for fixes to two bugs discovered
during the merge.
Diffstat (limited to 'activerecord/lib/active_record/type/type_map.rb')
-rw-r--r-- | activerecord/lib/active_record/type/type_map.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/type/type_map.rb b/activerecord/lib/active_record/type/type_map.rb index 09f5ba6b74..8ce36cc9af 100644 --- a/activerecord/lib/active_record/type/type_map.rb +++ b/activerecord/lib/active_record/type/type_map.rb @@ -1,12 +1,12 @@ -require 'thread_safe' +require 'concurrent' module ActiveRecord module Type class TypeMap # :nodoc: def initialize @mapping = {} - @cache = ThreadSafe::Cache.new do |h, key| - h.fetch_or_store(key, ThreadSafe::Cache.new) + @cache = Concurrent::Map.new do |h, key| + h.fetch_or_store(key, Concurrent::Map.new) end end |