You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/07/02 04:26:14 UTC

[GitHub] [arrow] westonpace commented on a change in pull request #10602: ARROW-13173: [C++] TestAsyncUtil.ReadaheadFailed asserts occasionally

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



##########
File path: cpp/src/arrow/util/async_generator_test.cc
##########
@@ -1095,40 +1095,51 @@ TEST(TestAsyncUtil, ReadaheadMove) {
 TEST(TestAsyncUtil, ReadaheadFailed) {
   ASSERT_OK_AND_ASSIGN(auto thread_pool, internal::ThreadPool::Make(4));
   std::atomic<int32_t> counter(0);
+  std::mutex mx;
+  bool error_unlocked = false;

Review comment:
       Thanks for the input.  I made a pass at simplifying.  I want to make sure there are at least some failed tasks so I left in a bit of gating (but reused a helper GatingTask instead of using mutexes and condition variables).  I did change the counter at the end to accept any # of remaining tasks.




-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org