/** * @param executor The executor to use to obtain threads * @param capacity The number of threads to preallocate. If less than 0 then capacity * is calculated based on a heuristic from the number of available processors and * thread pool size. */ public ReservedThreadExecutor(Executor executor,int capacity) { _executor = executor; _capacity = reservedThreads(executor,capacity); _stack = new ConcurrentLinkedDeque<>(); LOG.debug("{}",this); }
/** * @param executor The executor to use to obtain threads * @param capacity The number of threads to preallocate. If less than 0 then capacity * is calculated based on a heuristic from the number of available processors and * thread pool size. */ public ReservedThreadExecutor(Executor executor,int capacity) { _executor = executor; _capacity = reservedThreads(executor,capacity); _stack = new ConcurrentLinkedDeque<>(); LOG.debug("{}",this); }