keith-turner commented on code in PR #50:
URL: 
https://github.com/apache/accumulo-classloaders/pull/50#discussion_r2709387121


##########
modules/local-caching-classloader/src/main/java/org/apache/accumulo/classloader/lcc/LocalCachingContextClassLoaderFactory.java:
##########
@@ -99,7 +117,12 @@ public class LocalCachingContextClassLoaderFactory 
implements ContextClassLoader
   private static final Logger LOG =
       LoggerFactory.getLogger(LocalCachingContextClassLoaderFactory.class);
 
-  private final ScheduledExecutorService EXECUTOR = 
Executors.newScheduledThreadPool(0);
+  private final ScheduledThreadPoolExecutor executor =
+      new ScheduledThreadPoolExecutor(1, new 
ContextClassLoaderThreadFactory());

Review Comment:
   Maybe we could disallow calls to execute, because it creates an internal 
future that can not be accessed.
   
   ```java
     private final ScheduledThreadPoolExecutor executor =
         new ScheduledThreadPoolExecutor(1, new 
ContextClassLoaderThreadFactory()) {
               @Override
               public void execute(Runnable r){throw new 
UnsupportedOperationException("This method silently hides uncaught 
exceptions");}
         }
   ```
   
   Then for all the methods that return a future, track the futures looking for 
uncaught exceptions maybe?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to