davsclaus commented on code in PR #27602:
URL: https://github.com/apache/camel/pull/27602#discussion_r4232519628
##########
dsl/camel-cli-connector/src/main/java/org/apache/camel/cli/connector/LocalCliConnector.java:
##########
@@ -1841,6 +1925,13 @@ private JsonObject collectVaults() {
@Override
protected void doStop() throws Exception {
ServiceHelper.stopService(transport);
+ // Stop the transport before taking this monitor: file dispatch may
hold it while the transport stops.
+ synchronized (this) {
+ if (semanticExecutor != null) {
+ semanticExecutor.shutdownNow();
Review Comment:
Minor, non-blocking: this pool comes from `ThreadPoolBuilder`, so it is
registered with the CamelContext's `ExecutorServiceManager`. Calling
`shutdownNow()` directly leaves a stale entry in the manager's tracked list
until the context stops. The usual Camel idiom also deregisters it:
```suggestion
camelContext.getExecutorServiceManager().shutdownNow(semanticExecutor);
```
The same applies to `executor.shutdownNow()` in
`SemanticEvaluateConsole.doStop()`, using
`getCamelContext().getExecutorServiceManager().shutdownNow(executor)`.
--
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]