class Concurrent::CachedThreadPool
def ns_initialize(opts)
@!macro cached_thread_pool_method_initialize
def ns_initialize(opts) super(opts) if Concurrent.on_jruby? @max_queue = 0 @executor = java.util.concurrent.Executors.newCachedThreadPool( DaemonThreadFactory.new(ns_auto_terminate?)) @executor.setRejectedExecutionHandler(FALLBACK_POLICY_CLASSES[@fallback_policy].new) @executor.setKeepAliveTime(opts.fetch(:idletime, DEFAULT_THREAD_IDLETIMEOUT), java.util.concurrent.TimeUnit::SECONDS) end end