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

Method WaitForRunning

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

Source from the content-addressed store, hash-verified

1186 }
1187
1188 Status WaitForRunning(int count) {
1189#ifdef ARROW_ENABLE_THREADING
1190 std::unique_lock<std::mutex> lk(mx_);
1191 if (running_cv_.wait_for(
1192 lk, std::chrono::nanoseconds(static_cast<int64_t>(timeout_seconds_ * 1e9)),
1193 [this, count] { return num_running_ >= count; })) {
1194 return Status::OK();
1195 }
1196 return Status::Invalid("Timed out waiting for tasks to launch");
1197#else
1198 BusyWait(timeout_seconds_, [this, count] { return num_running_ >= count; });
1199 if (num_running_ >= count) {
1200 return Status::OK();
1201 } else {
1202 return Status::Invalid("Timed out waiting for tasks to launch");
1203 }
1204#endif
1205 }
1206
1207 Status Unlock() {
1208 {

Callers

nothing calls this directly

Calls 3

BusyWaitFunction · 0.85
OKFunction · 0.50
InvalidFunction · 0.50

Tested by

no test coverage detected