westonpace commented on a change in pull request #12662:
URL: https://github.com/apache/arrow/pull/12662#discussion_r832735868



##########
File path: cpp/src/arrow/util/async_generator.h
##########
@@ -1120,43 +1272,44 @@ class MergedGenerator {
 
   struct OuterCallback {
     void operator()(const Result<AsyncGenerator<T>>& maybe_next) {
-      bool should_purge = false;
       bool should_continue = false;
+      bool should_mark_gen_complete = false;

Review comment:
       The other variables are named based on "action to take" and not "state 
that we were in".  The logic is roughly...
   
   ```
   bool should_do_x = false;
   bool should_do_y = false;
   with lock:
     alter_state()
     should_do_x = in_state_a
     should_do_y = in_state_b
   if should_do_x:
     ...
   if should_do_y:
     ...
   ```
   
   So I think `should_mark_gen_complete` is consistent.




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