This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push: new 959f6ad CAMEL-14642: camel-spring-boot - Using max duration and shutdown before should terminate scheduled thread quicker 959f6ad is described below commit 959f6ad4edc4ebcc4dedcce69c44c9543471e657 Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Mon Mar 16 14:31:14 2020 +0100 CAMEL-14642: camel-spring-boot - Using max duration and shutdown before should terminate scheduled thread quicker --- .../src/main/java/org/apache/camel/main/MainSupport.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/camel-main/src/main/java/org/apache/camel/main/MainSupport.java b/core/camel-main/src/main/java/org/apache/camel/main/MainSupport.java index d578a84..1ef8714 100644 --- a/core/camel-main/src/main/java/org/apache/camel/main/MainSupport.java +++ b/core/camel-main/src/main/java/org/apache/camel/main/MainSupport.java @@ -17,6 +17,7 @@ package org.apache.camel.main; import java.util.LinkedList; +import java.util.concurrent.Callable; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; @@ -183,6 +184,13 @@ public abstract class MainSupport extends BaseMainSupport { latch.countDown(); } + /** + * Gets the complete task which allows to trigger this on demand. + */ + public Runnable getCompleteTask() { + return this::completed; + } + @Deprecated public int getDuration() { return mainConfigurationProperties.getDurationMaxSeconds();