summaryrefslogtreecommitdiffstats
path: root/vespalib
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2017-08-11 15:40:59 +0200
committerHenning Baldersheim <balder@yahoo-inc.com>2017-08-11 15:40:59 +0200
commit4a21c10c51e23222376867b5a022d3592a4e79a0 (patch)
tree17fd6756c8c3f68bdaea80c42c8ac59770e53bc1 /vespalib
parentc521ef714c7054c5a5c0d2e6b72f0cd6d34ec2e5 (diff)
Use explicit fetch_xxx instead of --/++ to signal costly operations.
Diffstat (limited to 'vespalib')
-rw-r--r--vespalib/src/tests/executor/threadstackexecutor_test.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/vespalib/src/tests/executor/threadstackexecutor_test.cpp b/vespalib/src/tests/executor/threadstackexecutor_test.cpp
index 3e092ef145f..db3c4628d2f 100644
--- a/vespalib/src/tests/executor/threadstackexecutor_test.cpp
+++ b/vespalib/src/tests/executor/threadstackexecutor_test.cpp
@@ -17,12 +17,12 @@ struct MyTask : public Executor::Task {
static std::atomic<uint32_t> deleteCnt;
MyTask(Gate &g, CountDownLatch &l) : gate(g), latch(l) {}
void run() override {
- runCnt++;
+ runCnt.fetch_add(1);
latch.countDown();
gate.await();
}
~MyTask() {
- deleteCnt++;
+ deleteCnt.fetch_add(1);
}
static void resetStats() {
runCnt = 0;