in src/main/java/org/apache/commons/pool3/impl/EvictionTimer.java [141:158]
static synchronized void cancel(final BaseGenericObjectPool<?, ?>.Evictor evictor, final Duration timeout,
final boolean restarting) {
if (evictor != null) {
evictor.cancel();
remove(evictor);
}
if (!restarting && executor != null && TASK_MAP.isEmpty()) {
executor.shutdown();
try {
executor.awaitTermination(timeout.toMillis(), TimeUnit.MILLISECONDS);
} catch (final InterruptedException e) {
// Swallow
// Significant API changes would be required to propagate this
}
executor.setCorePoolSize(0);
executor = null;
}
}