gitmodimo commented on code in PR #47386:
URL: https://github.com/apache/arrow/pull/47386#discussion_r2362457761


##########
cpp/src/arrow/acero/concurrent_queue_internal.h:
##########
@@ -164,10 +168,14 @@ class BackpressureConcurrentQueue : public 
ConcurrentQueue<T> {
     ConcurrentQueue<T>::ClearUnlocked();
   }
 
-  Status ForceShutdown() { return handler_.ForceShutdown(); }
+  void ForceShutdown() {
+    shutdown_ = true;
+    Clear();
+  }
 
  private:
   BackpressureHandler handler_;
+  bool shutdown_{false};

Review Comment:
   I believe this should be atomic. Thank you.



##########
cpp/src/arrow/acero/concurrent_queue_internal.h:
##########
@@ -164,10 +168,14 @@ class BackpressureConcurrentQueue : public 
ConcurrentQueue<T> {
     ConcurrentQueue<T>::ClearUnlocked();
   }
 
-  Status ForceShutdown() { return handler_.ForceShutdown(); }
+  void ForceShutdown() {
+    shutdown_ = true;
+    Clear();
+  }
 
  private:
   BackpressureHandler handler_;
+  bool shutdown_{false};

Review Comment:
   I believe this should be atomic. Thank you.



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

Reply via email to