gnodet commented on code in PR #14222:
URL: https://github.com/apache/camel/pull/14222#discussion_r1609580950
##########
core/camel-core-processor/src/main/java/org/apache/camel/processor/resequencer/ResequencerEngine.java:
##########
@@ -110,6 +120,30 @@ public synchronized int size() {
return sequence.size();
}
+ public void waitUntil(Predicate<Sequence<?>> pred) throws
InterruptedException {
+ CountDownLatch latch;
+ synchronized (this) {
Review Comment:
The conditions are evaluated when `insert()` or `deliverNext()` is called.
Those are synchronised methods. We do synchronize inside `evaluateConditions`,
but this is not really required, as the caller already holds the lock (it's
more to be coherent with the `waitUntil`). So the whole thing already
deadlocks if the lock is held forever by another thread. This won't change the
behaviour.
--
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]