lib/griffin/thread_pool.rb in griffin-0.2.1 vs lib/griffin/thread_pool.rb in griffin-0.2.2
- old
+ new
@@ -1,8 +1,8 @@
# frozen_string_literal: true
-require 'grpc_kit/thread_pool/auto_trimmer'
+require 'grpc_kit/rpc_dispatcher/auto_trimmer'
module Griffin
class ThreadPool
DEFAULT_MAX = 5
DEFAULT_MIN = 1
@@ -19,10 +19,10 @@
@workers = []
@mutex = Mutex.new
@waiting = 0
@min_pool_size.times { spawn_thread }
- @auto_trimmer = GrpcKit::ThreadPool::AutoTrimmer.new(self, interval: interval + rand(10)).tap(&:start!)
+ @auto_trimmer = GrpcKit::RpcDispatcher::AutoTrimmer.new(self, interval: interval + rand(10)).tap(&:start!)
end
def schedule(task, &block)
if task.nil?
return