aboutsummaryrefslogtreecommitdiffstats
path: root/activejob/lib/active_job/async_job.rb
diff options
context:
space:
mode:
authorKasper Timm Hansen <kaspth@gmail.com>2015-09-19 18:00:06 +0200
committerKasper Timm Hansen <kaspth@gmail.com>2015-09-19 18:00:06 +0200
commit1bf3cecf59821368cf3952188677b80a4407d883 (patch)
tree50663e739dce52d51297193c99714047201e8e69 /activejob/lib/active_job/async_job.rb
parentdcc941382b44eec0704c120cf1a73067c37ab79b (diff)
parent56ac6e4768adb1f7055474d40a9e921380559c43 (diff)
downloadrails-1bf3cecf59821368cf3952188677b80a4407d883.tar.gz
rails-1bf3cecf59821368cf3952188677b80a4407d883.tar.bz2
rails-1bf3cecf59821368cf3952188677b80a4407d883.zip
Merge pull request #21679 from jdantonio/replace-thread-safe
Replaced `ThreadSafe::Map` with successor `Concurrent::Map`.
Diffstat (limited to 'activejob/lib/active_job/async_job.rb')
-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