diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2015-09-19 18:00:06 +0200 |
---|---|---|
committer | Kasper Timm Hansen <kaspth@gmail.com> | 2015-09-19 18:00:06 +0200 |
commit | 1bf3cecf59821368cf3952188677b80a4407d883 (patch) | |
tree | 50663e739dce52d51297193c99714047201e8e69 /activejob/lib | |
parent | dcc941382b44eec0704c120cf1a73067c37ab79b (diff) | |
parent | 56ac6e4768adb1f7055474d40a9e921380559c43 (diff) | |
download | rails-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')
-rw-r--r-- | activejob/lib/active_job/async_job.rb | 3 |
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 |