summaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@broadpark.no>2020-12-03 19:01:04 +0100
committerTor Egge <Tor.Egge@broadpark.no>2020-12-03 19:01:04 +0100
commit54e2f0d40cad9ee1d442963e4dc765796fbac96b (patch)
tree5441d96c0c4d34256bdee50c2ae5c122a4914f90 /searchcore
parentfd7e517902ef54db9c60c8bad2b9d091130402ba (diff)
Don't increment or decrement volatile variables. It is deprecated
when using C++20.
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/querylimiter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/matching/querylimiter.cpp b/searchcore/src/vespa/searchcore/proton/matching/querylimiter.cpp
index 37ab0054851..ba5466700c8 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 = _activeThreads + 1;
}
void
QueryLimiter::releaseToken()
{
std::lock_guard<std::mutex> guard(_lock);
- _activeThreads--;
+ _activeThreads = _activeThreads - 1;
_cond.notify_one();
}