You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@helix.apache.org by "desaikomal (via GitHub)" <gi...@apache.org> on 2023/05/24 18:20:13 UTC

[GitHub] [helix] desaikomal commented on a diff in pull request #2507: Simplify the thread execution pool

desaikomal commented on code in PR #2507:
URL: https://github.com/apache/helix/pull/2507#discussion_r1204599514


##########
helix-core/src/main/java/org/apache/helix/task/TaskStateModelFactory.java:
##########
@@ -191,13 +192,7 @@ private static ScheduledExecutorService createThreadPoolExecutor(HelixManager ma
     LOG.info(
         "Obtained target thread pool size: {} from cluster {} for instance {}. Creating thread pool.",
         targetThreadPoolSize, manager.getClusterName(), manager.getInstanceName());
-    return Executors.newScheduledThreadPool(targetThreadPoolSize, new ThreadFactory() {
-      private AtomicInteger threadId = new AtomicInteger(0);
-
-      @Override
-      public Thread newThread(Runnable r) {
-        return new Thread(r, "TaskStateModelFactory-task_thread-" + threadId.getAndIncrement());
-      }
-    });
+    return Executors.newScheduledThreadPool(targetThreadPoolSize,

Review Comment:
   No particular reason, either does the job. 



-- 
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: reviews-unsubscribe@helix.apache.org

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