pitrou commented on a change in pull request #10632: URL: https://github.com/apache/arrow/pull/10632#discussion_r662218448
########## File path: cpp/src/arrow/util/async_generator_test.cc ########## @@ -67,14 +68,14 @@ class TrackingGenerator { return state_->source(); } - int num_read() { return state_->num_read; } + int num_read() { return state_->num_read.load(); } private: struct State { explicit State(AsyncGenerator<T> source) : source(std::move(source)), num_read(0) {} AsyncGenerator<T> source; - int num_read; + std::atomic<int> num_read; Review comment: @westonpace I had to change this as well, got a sporadic race condition in `MergedGeneratorTests/MergedGeneratorTestFixture.MergedLimitedSubscriptions/1`. -- 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