in src/main/java/com/aliyun/openservices/aliyun/log/producer/LogProducer.java [491:502]
private long closeIOThreadPool(long timeoutMs) throws InterruptedException, ProducerException {
long startMs = System.currentTimeMillis();
ioThreadPool.shutdown();
if (ioThreadPool.awaitTermination(timeoutMs, TimeUnit.MILLISECONDS)) {
LOGGER.debug("The ioThreadPool is terminated");
} else {
LOGGER.warn("The ioThreadPool is not fully terminated");
throw new ProducerException("the ioThreadPool is not fully terminated");
}
long nowMs = System.currentTimeMillis();
return Math.max(0, timeoutMs - nowMs + startMs);
}