westonpace commented on code in PR #13651:
URL: https://github.com/apache/arrow/pull/13651#discussion_r925639943
##########
cpp/src/arrow/util/future_test.cc:
##########
@@ -526,6 +527,23 @@ TEST(FutureStressTest, TryAddCallback) {
}
}
+TEST(FutureStressTest, DeleteAfterWait) {
+ constexpr int kNumTasks = 100;
+ for (int i = 0; i < kNumTasks; i++) {
+ {
+ std::unique_ptr<Future<>> future =
+ internal::make_unique<Future<>>(Future<>::Make());
+ std::thread t([&]() {
+ SleepABit();
+ future->MarkFinished();
+ });
+ ASSERT_TRUE(future->Wait(100));
Review Comment:
In most cases this wait will only be micro/milli seconds. However, the CI
machines have a tendency to hang for seconds at a time without yielding and I
don't see any real advantage in cutting it close. I will change it to
`arrow::kDefaultAssertFinishesWaitSeconds` which is 64 but maybe a bit more
clearly named.
--
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]