acvictor commented on code in PR #11824:
URL: https://github.com/apache/gluten/pull/11824#discussion_r2989419470


##########
cpp/velox/cudf/GpuLock.cc:
##########
@@ -72,12 +71,12 @@ void unlockGpu() {
     std::thread::id tid = std::this_thread::get_id();
     std::unique_lock<std::mutex> lock(getGpuLockState().gGpuMutex);
     if (!getGpuLockState().gGpuOwner.has_value()) {
-        LOG(INFO) <<"unlockGpu() called by non-owner thread!"<< std::endl;
+        LOG(INFO) << "unlockGpu() called when no thread holds the lock!";
         return;
     }
 
-    if (!getGpuLockState().gGpuOwner.has_value() || 
getGpuLockState().gGpuOwner != tid) {
-        throw std::runtime_error("unlockGpu() called by other-owner thread!");
+    if (getGpuLockState().gGpuOwner != tid) {
+        throw std::runtime_error("unlockGpu() called by non-owner thread!");

Review Comment:
   Updated, thanks!



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to