pitrou commented on code in PR #14339:
URL: https://github.com/apache/arrow/pull/14339#discussion_r989787914
##########
cpp/src/arrow/testing/gtest_util.cc:
##########
@@ -767,22 +769,20 @@ void BusyWait(double seconds, std::function<bool()>
predicate) {
}
}
-Future<> SleepAsync(double seconds) {
- auto out = Future<>::Make();
- std::thread([out, seconds]() mutable {
- SleepFor(seconds);
- out.MarkFinished();
- }).detach();
- return out;
+// These threads will spend most of their time sleeping so there
+// is no need to base this on the # of cores. Instead it should be
+// high enough to ensure good concurrency when there is concurrent hardware
+static constexpr int kNumSleepThreads = 32;
+
+std::shared_ptr<ThreadPool> CreateSleepThreadPool() {
Review Comment:
Nit: `static`?
--
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]