reta commented on a change in pull request #683:
URL: https://github.com/apache/cxf/pull/683#discussion_r455391971



##########
File path: 
rt/rs/microprofile-client/src/main/java/org/apache/cxf/microprofile/client/MicroProfileClientFactoryBean.java
##########
@@ -63,7 +66,7 @@ public 
MicroProfileClientFactoryBean(MicroProfileClientConfigurableImpl<RestClie
         super(new MicroProfileServiceFactoryBean());
         this.configuration = configuration.getConfiguration();
         this.comparator = 
MicroProfileClientProviderFactory.createComparator(this);
-        this.executorService = executorService;
+        this.executorService = (executorService == null) ? 
defaultExecutorService() : executorService; 

Review comment:
       Thanks for the review! This one is very tricky to make lazy. 
Essentially, this `executorService` sets (or unsets) the CXF's 
`EXECUTOR_SERVICE_PROPERTY` which basically controls how the async client 
invocation should be handled (it is used by MP and other clients). If we don't 
provide `executorService` upfront, the property won't be set and async callback 
(`MPRestClientCallback`) is going to be called in the context of CXF's work 
queue pool. The common `ForkJoinPool` is present 99.9% of the time.




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

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


Reply via email to