summaryrefslogtreecommitdiffstats
path: root/storage
diff options
context:
space:
mode:
authorTor Brede Vekterli <vekterli@oath.com>2019-01-09 09:45:52 +0000
committerTor Brede Vekterli <vekterli@oath.com>2019-01-09 09:45:52 +0000
commitc3fb1b2ec9788569990c232dfa1929e50077a4a1 (patch)
tree9e4a8c84c3cd36f65531acc95c2b837745030b39 /storage
parenta39087e75cc45d62105e0f62fc949f08703173fa (diff)
Pending count must be atomic, read and written from different threads
Diffstat (limited to 'storage')
-rw-r--r--storage/src/tests/storageserver/testvisitormessagesession.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/storage/src/tests/storageserver/testvisitormessagesession.h b/storage/src/tests/storageserver/testvisitormessagesession.h
index dc3bbef373c..a9d83ca6c1a 100644
--- a/storage/src/tests/storageserver/testvisitormessagesession.h
+++ b/storage/src/tests/storageserver/testvisitormessagesession.h
@@ -7,6 +7,8 @@
#include <vespa/documentapi/messagebus/messages/documentmessage.h>
#include <vespa/storage/storageserver/priorityconverter.h>
#include <vespa/config/subscription/configuri.h>
+
+#include <atomic>
#include <deque>
namespace storage {
@@ -23,7 +25,7 @@ public:
VisitorThread& thread;
Visitor& visitor;
- uint32_t pendingCount;
+ std::atomic<uint32_t> pendingCount;
~TestVisitorMessageSession();