aboutsummaryrefslogtreecommitdiffstats
path: root/activejob
diff options
context:
space:
mode:
authorJerry D'Antonio <stumpjumper@gmail.com>2015-09-19 09:56:26 -0400
committerJerry D'Antonio <stumpjumper@gmail.com>2015-09-19 09:56:26 -0400
commit56ac6e4768adb1f7055474d40a9e921380559c43 (patch)
tree01e085d38060f8739944177d6001c6996b6fc779 /activejob
parent0c39a022b0b432afff240c5624dadee00da8d175 (diff)
downloadrails-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 'activejob')
-rw-r--r--activejob/lib/active_job/async_job.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/activejob/lib/active_job/async_job.rb b/activejob/lib/active_job/async_job.rb
index 7fcffc4c24..6c1c070994 100644
--- a/activejob/lib/active_job/async_job.rb
+++ b/activejob/lib/active_job/async_job.rb
@@ -1,5 +1,4 @@
require 'concurrent'
-require 'thread_safe'
module ActiveJob
# == Active Job Async Job
@@ -31,7 +30,7 @@ module ActiveJob
fallback_policy: :caller_runs # shouldn't matter -- 0 max queue
}.freeze
- QUEUES = ThreadSafe::Cache.new do |hash, queue_name| #:nodoc:
+ QUEUES = Concurrent::Map.new do |hash, queue_name| #:nodoc:
hash.compute_if_absent(queue_name) { ActiveJob::AsyncJob.create_thread_pool }
end