nastra commented on code in PR #9150:
URL: https://github.com/apache/iceberg/pull/9150#discussion_r1430418619


##########
core/src/main/java/org/apache/iceberg/util/LockManagers.java:
##########
@@ -154,6 +154,14 @@ public void initialize(Map<String, String> properties) {
               CatalogProperties.LOCK_HEARTBEAT_THREADS,
               CatalogProperties.LOCK_HEARTBEAT_THREADS_DEFAULT);
     }
+
+    @Override
+    public void close() throws Exception {
+      if (scheduler != null) {
+        scheduler.shutdownNow();

Review Comment:
   ```suggestion
           List<Runnable> tasks = scheduler.shutdownNow();
           tasks.forEach(
               task -> {
                 if (task instanceof Future) {
                   ((Future<?>) task).cancel(true);
                 }
               });
   ```



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

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to