in aggregate-dist/src/main/java/org/apache/camel/example/Application.java [196:211]
private void stop() {
try {
executor.shutdown();
executor.awaitTermination(60, TimeUnit.SECONDS);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
LOG.error("Termination interrupted");
} finally {
if (executor.isTerminated()) {
LOG.debug("All tasks completed");
} else {
LOG.error("Forcing shutdown of tasks");
executor.shutdownNow();
}
}
}