You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kvrocks.apache.org by GitBox <gi...@apache.org> on 2022/07/09 13:22:04 UTC

[GitHub] [incubator-kvrocks] PragmaTwice commented on a diff in pull request #723: enhancement: use lock_guard to replace manual.

PragmaTwice commented on code in PR #723:
URL: https://github.com/apache/incubator-kvrocks/pull/723#discussion_r917268025


##########
src/worker.cc:
##########
@@ -345,10 +345,9 @@ Status Worker::Reply(int fd, const std::string &reply) {
 }
 
 void Worker::BecomeMonitorConn(Redis::Connection *conn) {
-  conns_mu_.lock();
+  std::lock_guard<std::mutex> guard(conns_mu_);

Review Comment:
   sematics is not equal to the previous code here



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org