You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@uniffle.apache.org by GitBox <gi...@apache.org> on 2022/07/12 03:29:32 UTC

[GitHub] [incubator-uniffle] smallzhongfeng commented on a diff in pull request #49: [Improvement] Provides utility classes for creating thread factories

smallzhongfeng commented on code in PR #49:
URL: https://github.com/apache/incubator-uniffle/pull/49#discussion_r918515672


##########
common/src/main/java/org/apache/uniffle/common/util/ThreadUtils.java:
##########
@@ -0,0 +1,15 @@
+package org.apache.uniffle.common.util;

Review Comment:
   done



##########
common/src/main/java/org/apache/uniffle/common/util/ThreadUtils.java:
##########
@@ -0,0 +1,15 @@
+package org.apache.uniffle.common.util;
+
+import com.google.common.util.concurrent.ThreadFactoryBuilder;
+
+import java.util.concurrent.ThreadFactory;
+
+/**
+ * Provide a general method to create a thread factory to make the code more standardized
+ */
+public class ThreadUtils {
+
+  public static ThreadFactory getThreadFactory(String factoryName) {
+    return new ThreadFactoryBuilder().setDaemon(true).setNameFormat(factoryName).build();
+  }
+}

Review Comment:
   done



-- 
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: issues-unsubscribe@uniffle.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org