kezhuw commented on code in PR #1264:
URL: https://github.com/apache/curator/pull/1264#discussion_r2034443515


##########
curator-recipes/src/main/java/org/apache/curator/framework/recipes/nodes/PersistentTtlNode.java:
##########
@@ -61,12 +61,15 @@ public class PersistentTtlNode implements Closeable {
     public static final int DEFAULT_TOUCH_SCHEDULE_FACTOR = 2;
     public static final boolean DEFAULT_USE_PARENT_CREATION = true;
 
+    private static final boolean SHUTDOWN_EXECUTOR = true;
+
     private final Logger log = LoggerFactory.getLogger(getClass());
     private final PersistentNode node;
     private final CuratorFramework client;
     private final long ttlMs;
     private final int touchScheduleFactor;
     private final ScheduledExecutorService executorService;
+    private final boolean shutdownExecutor; // If needed to shut down 
executorService when closing

Review Comment:
   I saw `CloseableScheduledExecutorService`, and think it fit this use case 
pretty well.



-- 
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: commits-unsubscr...@curator.apache.org

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

Reply via email to