gnodet-bot commented on code in PR #28823:
URL: https://github.com/apache/camel/pull/28823#discussion_r4439277455


##########
core/camel-util/src/main/java/org/apache/camel/util/concurrent/BoundedExecutorService.java:
##########
@@ -159,7 +205,8 @@ public int getWaitingCount() {
     }
 
     /**
-     * The number of times the timeout expired and a task fell back to running 
on the caller's thread.
+     * The number of times a task ran on the caller's thread, because the 
timeout expired or a task of this executor
+     * submitted it and no permit was available.

Review Comment:
   The Javadoc is slightly over-broad. The phrase "a task of this executor 
submitted it and no permit was available" covers both the `depth < 64` path 
(where `callerRunsCount.increment()` fires in `runNested`) and the `depth >= 
64` path (which calls `delegate.execute(() -> runTask(command))` and increments 
`delegatedTaskCount` instead). The counter only counts the inline case.
   
   Suggestion: narrow to clarify only depth < 64 tasks are counted here, e.g.:
   
   > The number of times a task ran on the caller's thread, because the timeout 
expired or a task of this executor submitted it when no permit was available 
and the inline depth limit was not reached.



-- 
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