psteitz commented on a change in pull request #32:
URL: https://github.com/apache/commons-pool/pull/32#discussion_r458466392
##########
File path: src/main/java/org/apache/commons/pool2/impl/EvictionTimer.java
##########
@@ -79,10 +86,15 @@ static synchronized void schedule(
if (null == executor) {
executor = new ScheduledThreadPoolExecutor(1, new
EvictorThreadFactory());
executor.setRemoveOnCancelPolicy(true);
+ taskMap.clear();
+ executor.scheduleAtFixedRate(new Reaper(), delay, period,
TimeUnit.MILLISECONDS);
}
+ final WeakReference<Runnable> ref = new WeakReference<>(task);
+ final WeakRunner runner = new WeakRunner(ref);
Review comment:
I need the reference to put in the map.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]