You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@helix.apache.org by GitBox <gi...@apache.org> on 2020/08/07 19:39:33 UTC

[GitHub] [helix] kaisun2000 commented on a change in pull request #1213: Identify and eliminate TaskModel Thread

kaisun2000 commented on a change in pull request #1213:
URL: https://github.com/apache/helix/pull/1213#discussion_r467234179



##########
File path: helix-core/src/main/java/org/apache/helix/messaging/handling/HelixTaskExecutor.java
##########
@@ -209,7 +211,7 @@ public void registerMessageHandlerFactory(String type, MessageHandlerFactory fac
     if (prevItem == null) {
       ExecutorService newPool = Executors.newFixedThreadPool(threadpoolSize, new ThreadFactory() {
         @Override public Thread newThread(Runnable r) {
-          return new Thread(r, "HelixTaskExecutor-message_handle_thread");
+          return new Thread(r, "HelixTaskExecutor-message_handle_thread_" + thread_uid.getAndIncrement());

Review comment:
       Daemon thread is just to make sure that JVM can shutdown automatically when main thread ( and all other non daemon thread) exit. It is similar to you Unix machine restart, daemon process won't block it from restarting, but your forground process, say intellij can block the restart of Unix machine.




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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org