pitrou commented on a change in pull request #9656:
URL: https://github.com/apache/arrow/pull/9656#discussion_r590476061
##########
File path: cpp/src/arrow/ipc/reader.h
##########
@@ -169,6 +170,17 @@ class ARROW_EXPORT RecordBatchFileReader {
/// \brief Return current read statistics
virtual ReadStats stats() const = 0;
+
+ /// \brief Get a reentrant generator of record batches.
+ ///
+ /// This RecordBatchFileReader must outlive the generator.
Review comment:
Given that we're talking about an asynchronous primitive, forcing the
caller to deal with lifetime issues is a bit unfriendly IMHO. It may be simpler
to make `RecordBatchFileReader` inherit from `enable_shared_from_this` and
capture a strong reference inside the generator.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]