module H2::Client::Concurrent::ClassMethods

Public Instance Methods

thread_pool() click to toggle source
# File lib/h2/client/concurrent.rb, line 9
def thread_pool
  return @thread_pool if @thread_pool
  procs = ::Concurrent.processor_count
  @thread_pool = ::Concurrent::ThreadPoolExecutor.new min_threads: 0,
                                                      max_threads: procs,
                                                      max_queue:   procs * 5
end