pitrou commented on code in PR #13635:
URL: https://github.com/apache/arrow/pull/13635#discussion_r981240447
##########
r/src/compute-exec.cpp:
##########
@@ -106,6 +108,15 @@ class ExecPlanReader : public arrow::RecordBatchReader {
return arrow::Status::OK();
}
+ // Check for cancellation and stop the plan if we have a request. When
+ // the ExecPlan supports passing a StopToken and handling this itself,
+ // this will be redundant.
+ ARROW_RETURN_NOT_OK(stop_token_.Poll());
Review Comment:
You do not need to call both `Poll()` and `IsStopRequested()`. The former
will return an error if and only if the latter returns true.
--
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]