aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src/tests/proton/flushengine
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@oath.com>2017-12-11 13:45:10 +0000
committerTor Egge <Tor.Egge@oath.com>2017-12-11 14:49:46 +0000
commitfefc3ca0ce485ac61f8ce67eb08edb2fe23c7137 (patch)
treec30d27642847623f57e24bade6b39235c209c5bd /searchcore/src/tests/proton/flushengine
parent74f4f321357c0349614ee68c6073a07f40d82e11 (diff)
Use standard locking in searchcore (pass 1).
Diffstat (limited to 'searchcore/src/tests/proton/flushengine')
-rw-r--r--searchcore/src/tests/proton/flushengine/flushengine.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/searchcore/src/tests/proton/flushengine/flushengine.cpp b/searchcore/src/tests/proton/flushengine/flushengine.cpp
index 985a970a380..d1a98f1b7d3 100644
--- a/searchcore/src/tests/proton/flushengine/flushengine.cpp
+++ b/searchcore/src/tests/proton/flushengine/flushengine.cpp
@@ -11,8 +11,8 @@
#include <vespa/searchcore/proton/test/dummy_flush_target.h>
#include <vespa/vespalib/testkit/testapp.h>
#include <vespa/vespalib/data/slime/slime.h>
-#include <vespa/vespalib/util/sync.h>
#include <vespa/vespalib/test/insertion_operators.h>
+#include <mutex>
#include <chrono>
#include <vespa/log/log.h>
@@ -123,7 +123,7 @@ public:
search::SerialNum _oldestSerial;
search::SerialNum _currentSerial;
uint32_t _pendingDone;
- vespalib::Lock _lock;
+ std::mutex _lock;
vespalib::CountDownLatch _done;
FlushDoneHistory _flushDoneHistory;
@@ -168,7 +168,7 @@ public:
// Called once by flush engine slave thread for each task done
void taskDone()
{
- vespalib::LockGuard guard(_lock);
+ std::lock_guard<std::mutex> guard(_lock);
++_pendingDone;
}
@@ -178,7 +178,7 @@ public:
void
flushDone(search::SerialNum oldestSerial) override
{
- vespalib::LockGuard guard(_lock);
+ std::lock_guard<std::mutex> guard(_lock);
LOG(info, "SimpleHandler(%s)::flushDone(%" PRIu64 ")",
getName().c_str(), oldestSerial);
_oldestSerial = std::max(_oldestSerial, oldestSerial);
@@ -191,7 +191,7 @@ public:
FlushDoneHistory getFlushDoneHistory()
{
- vespalib::LockGuard guard(_lock);
+ std::lock_guard<std::mutex> guard(_lock);
return _flushDoneHistory;
}
};