essobedo commented on code in PR #8785:
URL: https://github.com/apache/camel/pull/8785#discussion_r1033912735


##########
core/camel-support/src/main/java/org/apache/camel/support/task/BackgroundTask.java:
##########
@@ -167,12 +147,14 @@ private boolean waitForTaskCompletion(CountDownLatch 
latch, Future<?> task) {
         } finally {
             elapsed = budget.elapsed();
         }
-
-        return completed;
     }
 
     @Override
     public Duration elapsed() {
         return elapsed;
     }
+
+    private static class ExecutionResult {
+        private boolean completed;

Review Comment:
   @orpiske This makes me wonder if `BackgroundTask` is stateful or stateless? 
I mean can we run several times the same background task? because if not, I 
guess that the `CountDownLatch` and this field could be moved directly as 
fields of `BackgroundTask` otherwise maybe we could add the `CountDownLatch` to 
that class and rename it to something like `ExecutionState`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to