aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/querylimiter.cpp4
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/querylimiter.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/matching/querylimiter.cpp b/searchcore/src/vespa/searchcore/proton/matching/querylimiter.cpp
index ba5466700c8..37ab0054851 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/querylimiter.cpp
+++ b/searchcore/src/vespa/searchcore/proton/matching/querylimiter.cpp
@@ -25,14 +25,14 @@ QueryLimiter::grabToken(const Doom & doom)
_cond.wait_for(guard, left);
}
}
- _activeThreads = _activeThreads + 1;
+ _activeThreads++;
}
void
QueryLimiter::releaseToken()
{
std::lock_guard<std::mutex> guard(_lock);
- _activeThreads = _activeThreads - 1;
+ _activeThreads--;
_cond.notify_one();
}
diff --git a/searchcore/src/vespa/searchcore/proton/matching/querylimiter.h b/searchcore/src/vespa/searchcore/proton/matching/querylimiter.h
index 45783959957..576c5921b61 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/querylimiter.h
+++ b/searchcore/src/vespa/searchcore/proton/matching/querylimiter.h
@@ -37,7 +37,7 @@ private:
void releaseToken();
std::mutex _lock;
std::condition_variable _cond;
- volatile int _activeThreads;
+ int _activeThreads;
// These are updated asynchronously at reconfig.
volatile int _maxThreads;