rtpsw commented on code in PR #35902:
URL: https://github.com/apache/arrow/pull/35902#discussion_r1218261678


##########
cpp/src/arrow/acero/source_node.cc:
##########
@@ -263,6 +263,22 @@ struct SourceNode : ExecNode, public TracedNode {
     to_finish.MarkFinished();
   }
 
+  Status StopProducing() override {
+    // GH-35837: ensure node is not paused
+    Future<> to_finish;
+    {
+      std::lock_guard<std::mutex> lg(mutex_);
+      if (!backpressure_future_.is_finished()) {

Review Comment:
   This code block implements essentially the same logic as `ResumeProducing`, 
which @westonpace could likely explain better than myself.



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