sashapolo commented on code in PR #5900:
URL: https://github.com/apache/ignite-3/pull/5900#discussion_r2108659280


##########
modules/core/src/main/java/org/apache/ignite/internal/util/FastTimestamps.java:
##########
@@ -31,23 +35,15 @@ public class FastTimestamps {
     }
 
     private static void startUpdater() {
-        Thread updater = new Thread("FastTimestamps updater") {
-            /** {@inheritDoc} */
-            @Override
-            public void run() {
-                while (true) {
-                    coarseCurrentTimeMillis = System.currentTimeMillis();
-                    try {
-                        Thread.sleep(UPDATE_INTERVAL_MS);
-                    } catch (InterruptedException e) {
-                        break;
-                    }
-                }
-            }
-        };
+        ScheduledExecutorService scheduledExecutor = 
Executors.newSingleThreadScheduledExecutor(r -> {
+            Thread t = new Thread(r, "FastTimestamps updater");

Review Comment:
   you can create daemon threads with IgniteThreadFactory. Agree with the node 
name, but I actually think that we should make this an Ignite component: it 
will allow us to have the node name and to shutdown the executor gracefully. 
This is out of scope of this PR, though



-- 
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-unsubscr...@ignite.apache.org

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

Reply via email to