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



##########
File path: cpp/src/arrow/util/async_generator.h
##########
@@ -60,6 +60,9 @@ namespace arrow {
 // Readahead operators, and some other operators, may introduce queueing.  Any 
operators
 // that introduce buffering should detail the amount of buffering they 
introduce in their
 // MakeXYZ function comments.
+//
+// A generator should always be fully consumed before it is destroyed.
+// A generator should not emit a terminal item until it has finished all 
ongoing futures.

Review comment:
       I ended up with:
   ```
   // A generator should not mark a future complete with an error status or a 
terminal value
   //   until all outstanding futures have completed.  Generators that spawn 
multiple
   //   concurrent futures may need to hold onto an error while other 
concurrent futures wrap
   //   up.
   ```




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