public void shutdown()

in src/main/java/com/epam/gmp/process/QueuedProcessService.java [80:97]


    public void shutdown(int timeout) {
        if (logger.isInfoEnabled()) {
            logger.info("Global shutdown requested");
        }
        if (threadPool.shutdown(timeout)) {
            try {
                long start = System.currentTimeMillis();
                if (!threadPool.awaitTermination(10, TimeUnit.SECONDS)) {
                    logger.info("ThreadPool shutdown timeout");
                }
                if (logger.isInfoEnabled()) {
                    logger.info("ThreadPool has been terminated in: {} millis.", System.currentTimeMillis() - start);
                }
            } catch (InterruptedException e) {
                logger.error("Unable to stop thread pool correctly.", e);
            }
        }
    }