keith-turner commented on code in PR #50:
URL:
https://github.com/apache/accumulo-classloaders/pull/50#discussion_r2709625868
##########
modules/local-caching-classloader/src/main/java/org/apache/accumulo/classloader/lcc/LocalCachingContextClassLoaderFactory.java:
##########
@@ -312,4 +349,17 @@ public static Map<String,List<String>>
getReferencedFiles() {
return referencedContexts;
}
+ private void handleUncaughtExceptionInMonitor() {
+ cleanupLock.writeLock().lock();
+ try {
Review Comment:
Wrote the following code to see if task are in queue when running. They do
not seems to be in the queue when they are running according to the counts I am
seeing.
```java
public class Test {
public static void main(String[] args) throws Exception {
ScheduledThreadPoolExecutor stpe = new
ScheduledThreadPoolExecutor(1);
var future1 =
stpe.scheduleAtFixedRate(()->{System.out.println("Queue size 1
"+stpe.getQueue().size());}, 1, 1, TimeUnit.SECONDS);
var future2 =
stpe.scheduleAtFixedRate(()->{System.out.println("Queue size 2
"+stpe.getQueue().size());}, 1, 1, TimeUnit.SECONDS);
System.out.println("Queue size 3 "+stpe.getQueue().size());
Thread.sleep(5000);
System.out.println("Queue size 3 "+stpe.getQueue().size());
future2.cancel(false);
System.out.println("Cancelled future 2");
Thread.sleep(5000);
System.out.println("Queue size 3 "+stpe.getQueue().size());
}
}
```
--
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]