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


##########
cpp/src/arrow/util/thread_pool.h:
##########
@@ -301,8 +301,10 @@ class ARROW_EXPORT SerialExecutor : public Executor {
   /// approach is to use a stop token to cause the generator to exhaust early.
   template <typename T>
   static Iterator<T> IterateGenerator(
-      internal::FnOnce<Result<std::function<Future<T>()>>(Executor*)> 
initial_task) {
+      internal::FnOnce<Result<std::function<Future<T>()>>(Executor*)> 
initial_task,
+      internal::SerialExecutor** serial_executor_out = NULLPTR) {

Review Comment:
   The `StopProducing` approach ([noted 
here](https://github.com/apache/arrow/pull/35953/#issuecomment-1589892510)) 
worked in an internal experiment. Side note: the pre-PR version also had a call 
to `StopProducing`, in the destructor of `BatchConverter`, but it was too late 
- a hang happens earlier.



-- 
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: github-unsubscr...@arrow.apache.org

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

Reply via email to