benibus commented on issue #14792: URL: https://github.com/apache/arrow/issues/14792#issuecomment-1346975208
On first glance, it appears that thread-safety would be an issue, but I believe that risk gets removed here: https://github.com/apache/arrow/blob/6f4a539323da0d6aef528ccce2404e36f0a08585/cpp/src/arrow/csv/reader.cc#L909-L910 `MappingGenerator` seems to have some "hidden" functionality, in that it queues jobs and waits for each each future from its source to finish before proceeding with the next one - so `CSVBufferIterator` and `SerialBlockReader` would never be invoked from multiple threads. I'm not sure if this was an intended side-effect here though. If I'm not mistaken, this would also imply that `MappingGenerator` is async-reentrant _regardless_ of its source generator - which appears to contradict its documentation. https://github.com/apache/arrow/blob/6f4a539323da0d6aef528ccce2404e36f0a08585/cpp/src/arrow/util/async_generator.h#L267-L271 -- 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