From 56ac6e4768adb1f7055474d40a9e921380559c43 Mon Sep 17 00:00:00 2001 From: Jerry D'Antonio Date: Sat, 19 Sep 2015 09:56:26 -0400 Subject: 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. --- activejob/lib/active_job/async_job.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'activejob/lib/active_job') 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 -- cgit v1.2.3