According to the Javadoc, the ExecutorService will first create threads up to corePoolSize. Those threads will be left active in the pool. Next, if there are more that corePoolSize but less than maximumPoolSize threads running then the request will be added to the queue. If the queue is full then a new thread will be created.
So in our case, since corePoolSize is zero no threads will ever be left running. Since the queue size is zero every new execution will create a new thread. I did this since you mentioned multiple async requests should be allowed to run simultaneously. But as I think about it, each RollingFileManager will probably only ever have a single async task running at a time, so it may not matter. Ralph > On Jan 24, 2017, at 4:03 PM, Remko Popma <remko.po...@gmail.com> wrote: > > What's the purpose of the EmptyQueue? What would happen if a configuration > has multiple rolling files that all roll over at the same time, would > EmptyQueue prevent the 2nd task from being scheduled? > > Small detail: > public boolean releaseSub(final long timeout, final TimeUnit timeUnit) { > + LOGGER.debug("Shutting down RollingFileManager {}" + getName()); // > '+' should be ',' > > Also not sure if the code restores the interrupt flag diligently enough. Need > to check on a pc later. > > Sent from my iPhone > >> On Jan 25, 2017, at 6:48, rgo...@apache.org wrote: >> >> >> + if (asyncExecutor.isTerminated()) { >> + LOGGER.debug > > --------------------------------------------------------------------- > To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org > For additional commands, e-mail: log4j-dev-h...@logging.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-dev-h...@logging.apache.org