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

Method WaitForRunning

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

BusyWaitFunction · 0.85
OKFunction · 0.50
InvalidFunction · 0.50

Tested by

no test coverage detected