You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shenyu.apache.org by GitBox <gi...@apache.org> on 2021/06/18 21:14:19 UTC

[GitHub] [incubator-shenyu] dengliming commented on a change in pull request #1632: fix (admin,client): Add the thread pool name to the thread pool of shenyu-client

dengliming commented on a change in pull request #1632:
URL: https://github.com/apache/incubator-shenyu/pull/1632#discussion_r654252957



##########
File path: shenyu-client/shenyu-client-dubbo/shenyu-client-alibaba-dubbo/src/main/java/org/apache/shenyu/client/alibaba/dubbo/AlibabaDubboServiceBeanListener.java
##########
@@ -78,7 +79,8 @@ public AlibabaDubboServiceBeanListener(final ShenyuRegisterCenterConfig config,
         this.appName = appName;
         this.host = props.getProperty("host");
         this.port = props.getProperty("port");
-        executorService = new ThreadPoolExecutor(1, 1, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue<>());
+        executorService = new ThreadPoolExecutor(1, 1, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue<>(), new ThreadFactoryBuilder()

Review comment:
       I'm a little confused. What's the difference between this and `java.util.concurrent.Executors#newSingleThreadExecutor(java.util.concurrent.ThreadFactory)` ?

##########
File path: shenyu-client/shenyu-client-dubbo/shenyu-client-alibaba-dubbo/src/main/java/org/apache/shenyu/client/alibaba/dubbo/AlibabaDubboServiceBeanListener.java
##########
@@ -78,7 +79,8 @@ public AlibabaDubboServiceBeanListener(final ShenyuRegisterCenterConfig config,
         this.appName = appName;
         this.host = props.getProperty("host");
         this.port = props.getProperty("port");
-        executorService = new ThreadPoolExecutor(1, 1, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue<>());
+        executorService = new ThreadPoolExecutor(1, 1, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue<>(), new ThreadFactoryBuilder()

Review comment:
       Thanks. I'm not quite sure that using only one thread is a reasonable choice. @yu199195 @tydhot 
   
   




-- 
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:
users@infra.apache.org