MCPcopy Create free account
hub / github.com/apache/arrow / WaitForRunning

Method WaitForRunning

cpp/src/arrow/testing/gtest_util.cc:1233–1250  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1231 }
1232
1233 Status WaitForRunning(int count) {
1234#ifdef ARROW_ENABLE_THREADING
1235 std::unique_lock<std::mutex> lk(mx_);
1236 if (running_cv_.wait_for(
1237 lk, std::chrono::nanoseconds(static_cast<int64_t>(timeout_seconds_ * 1e9)),
1238 [this, count] { return num_running_ >= count; })) {
1239 return Status::OK();
1240 }
1241 return Status::Invalid("Timed out waiting for tasks to launch");
1242#else
1243 BusyWait(timeout_seconds_, [this, count] { return num_running_ >= count; });
1244 if (num_running_ >= count) {
1245 return Status::OK();
1246 } else {
1247 return Status::Invalid("Timed out waiting for tasks to launch");
1248 }
1249#endif
1250 }
1251
1252 Status Unlock() {
1253 {

Callers

nothing calls this directly

Calls 3

BusyWaitFunction · 0.85
OKFunction · 0.50
InvalidFunction · 0.50

Tested by

no test coverage detected