summaryrefslogtreecommitdiffstats
path: root/container-core
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2017-01-26 10:51:34 +0100
committerHenning Baldersheim <balder@yahoo-inc.com>2017-01-26 10:51:34 +0100
commit2d6ab5b6fe52e8066aa559ff6cee3cb4b1cde8bc (patch)
treea5cc460eaf0c223d91f292bb3d6e5144a00153a1 /container-core
parentd757ee1af9cf32b991c907ea21aa767118a5ab87 (diff)
When counting started and completed and then reporting the difference,
both must be incremented.....
Diffstat (limited to 'container-core')
-rw-r--r--container-core/src/main/java/com/yahoo/container/handler/ThreadPoolProvider.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/container-core/src/main/java/com/yahoo/container/handler/ThreadPoolProvider.java b/container-core/src/main/java/com/yahoo/container/handler/ThreadPoolProvider.java
index f220d9e0027..f6851a0683e 100644
--- a/container-core/src/main/java/com/yahoo/container/handler/ThreadPoolProvider.java
+++ b/container-core/src/main/java/com/yahoo/container/handler/ThreadPoolProvider.java
@@ -143,8 +143,8 @@ public class ThreadPoolProvider extends AbstractComponent implements Provider<Ex
private final static class WorkerCompletionTimingThreadPoolExecutor extends ThreadPoolExecutor {
volatile long lastThreadReturnTimeMillis = System.currentTimeMillis();
- AtomicLong startedCount = new AtomicLong(0);
- AtomicLong completedCount = new AtomicLong(0);
+ private final AtomicLong startedCount = new AtomicLong(0);
+ private final AtomicLong completedCount = new AtomicLong(0);
public WorkerCompletionTimingThreadPoolExecutor(int corePoolSize,
int maximumPoolSize,
@@ -165,7 +165,7 @@ public class ThreadPoolProvider extends AbstractComponent implements Provider<Ex
protected void afterExecute(Runnable r, Throwable t) {
super.afterExecute(r, t);
lastThreadReturnTimeMillis = System.currentTimeMillis();
- completedCount.decrementAndGet();
+ completedCount.incrementAndGet();
}
@Override