You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@kyuubi.apache.org by "cxzl25 (via GitHub)" <gi...@apache.org> on 2023/04/12 03:04:57 UTC

[GitHub] [kyuubi] cxzl25 commented on a diff in pull request #4682: [KYUUBI #4681][Engine] Set thread `CreateSparkTimeoutChecker` daemon

cxzl25 commented on code in PR #4682:
URL: https://github.com/apache/kyuubi/pull/4682#discussion_r1163533354


##########
externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/SparkSQLEngine.scala:
##########
@@ -359,16 +359,16 @@ object SparkSQLEngine extends Logging {
 
   private def startInitTimeoutChecker(startTime: Long, timeout: Long): Unit = {
     val mainThread = Thread.currentThread()
-    new Thread(
-      () => {
-        while (System.currentTimeMillis() - startTime < timeout && !sparkSessionCreated.get()) {
-          Thread.sleep(500)
-        }
-        if (!sparkSessionCreated.get()) {
-          mainThread.interrupt()
-        }
-      },
-      "CreateSparkTimeoutChecker").start()
+    val checker = new Thread(() => {
+      while (System.currentTimeMillis() - startTime < timeout && !sparkSessionCreated.get()) {
+        Thread.sleep(500)
+      }
+      if (!sparkSessionCreated.get()) {
+        mainThread.interrupt()
+      }
+    })

Review Comment:
   Should we set the thread name?



-- 
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: notifications-unsubscribe@kyuubi.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org