pitrou commented on a change in pull request #9720:
URL: https://github.com/apache/arrow/pull/9720#discussion_r595837013



##########
File path: cpp/src/arrow/testing/gtest_util.cc
##########
@@ -769,10 +770,8 @@ class GatingTask::Impl {
   }
 
   Status Unlock() {
-    {
-      std::lock_guard<std::mutex> lk(mx_);
-      unlocked_ = true;
-    }
+    std::lock_guard<std::mutex> lk(mx_);

Review comment:
       Indeed, but this is a test util so I'd favor simplicity.

##########
File path: cpp/src/arrow/testing/gtest_util.cc
##########
@@ -769,10 +770,8 @@ class GatingTask::Impl {
   }
 
   Status Unlock() {
-    {
-      std::lock_guard<std::mutex> lk(mx_);
-      unlocked_ = true;
-    }
+    std::lock_guard<std::mutex> lk(mx_);

Review comment:
       Indeed, but this is a test utility so I'd favor simplicity.




----------------------------------------------------------------
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.

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


Reply via email to