From 4a21c10c51e23222376867b5a022d3592a4e79a0 Mon Sep 17 00:00:00 2001 From: Henning Baldersheim Date: Fri, 11 Aug 2017 15:40:59 +0200 Subject: Use explicit fetch_xxx instead of --/++ to signal costly operations. --- vespalib/src/tests/executor/threadstackexecutor_test.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'vespalib/src/tests/executor') 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 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; -- cgit v1.2.3