summaryrefslogtreecommitdiffstats
path: root/messagebus_test
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2020-10-08 08:24:55 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2020-10-08 08:24:55 +0000
commit3b3ea0cf9c580e658abab59d1d020d9db9ec9cb9 (patch)
tree6d6b9b74ef716f09b17aaf24ca63760578837843 /messagebus_test
parent4291a9ec03e9b5b7c23473725678b3c0785cbf91 (diff)
Use vespalib::Lock -> std::mutex
Diffstat (limited to 'messagebus_test')
-rw-r--r--messagebus_test/src/tests/speed/cpp-client.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/messagebus_test/src/tests/speed/cpp-client.cpp b/messagebus_test/src/tests/speed/cpp-client.cpp
index b5829c76c08..2c20b35c597 100644
--- a/messagebus_test/src/tests/speed/cpp-client.cpp
+++ b/messagebus_test/src/tests/speed/cpp-client.cpp
@@ -17,7 +17,7 @@ using namespace std::chrono_literals;
class Client : public IReplyHandler
{
private:
- vespalib::Lock _lock;
+ std::mutex _lock;
uint32_t _okCnt;
uint32_t _failCnt;
SourceSession::UP _session;
@@ -58,7 +58,7 @@ Client::send(uint64_t seq) {
void
Client::sample(uint32_t &okCnt, uint32_t &failCnt) {
- vespalib::LockGuard guard(_lock);
+ std::lock_guard guard(_lock);
okCnt = _okCnt;
failCnt = _failCnt;
}
@@ -69,7 +69,7 @@ Client::handleReply(Reply::UP reply) {
&& (reply->getType() == SimpleProtocol::REPLY)
&& (static_cast<SimpleReply&>(*reply).getValue() == "OK"))
{
- vespalib::LockGuard guard(_lock);
+ std::lock_guard guard(_lock);
++_okCnt;
} else {
fprintf(stderr, "BAD REPLY\n");
@@ -78,7 +78,7 @@ Client::handleReply(Reply::UP reply) {
reply->getError(i).getCode(),
reply->getError(i).getMessage().c_str());
}
- vespalib::LockGuard guard(_lock);
+ std::lock_guard guard(_lock);
++_failCnt;
}
send();