thuri commented on code in PR #8785:
URL: https://github.com/apache/camel/pull/8785#discussion_r1033919412
##########
core/camel-support/src/main/java/org/apache/camel/support/task/BackgroundTask.java:
##########
@@ -85,78 +85,58 @@ public BackgroundTask build() {
this.name = name;
}
- private <T> void runTaskWrapper(CountDownLatch latch, Predicate<T>
predicate, T payload) {
+ private void runTaskWrapper(CountDownLatch latch, BooleanSupplier
supplier, ExecutionResult result) {
LOG.trace("Current latch value: {}", latch.getCount());
-
if (latch.getCount() == 0) {
return;
}
if (!budget.next()) {
LOG.warn("The task {} does not have more budget to continue
running", name);
-
- return;
- }
-
- if (predicate.test(payload)) {
+ result.completed = false;
Review Comment:
It's not necessary but i think it's easier to comprehend when it's
explicitly defined
--
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]