dragon-zhang commented on code in PR #3433:
URL: https://github.com/apache/incubator-shenyu/pull/3433#discussion_r882282670


##########
shenyu-plugin/shenyu-plugin-tars/src/main/java/org/apache/shenyu/plugin/tars/TarsPlugin.java:
##########
@@ -79,9 +97,19 @@ protected Mono<Void> doExecute(final ServerWebExchange 
exchange, final ShenyuPlu
         Object prx = 
tarsInvokePrxList.getTarsInvokePrxList().get(index).getInvokePrx();
         Method method = tarsInvokePrxList.getMethod();
         CompletableFuture future;
+
+        initThreadPool();
         try {
-            future = (CompletableFuture) method
-                    .invoke(prx, 
PrxInfoUtil.getParamArray(tarsInvokePrxList.getParamTypes(), 
tarsInvokePrxList.getParamNames(), body));
+            future = CompletableFuture.supplyAsync(() -> {

Review Comment:
   We should find the implementation of the `proxy`, and then try to use the 
shared thread pool in the `proxy`, instead of using 
`CompletableFuture#supplyAsync` directly.



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