| 257 | const int32 kLoggingPeriodMs = 10 * 1000; |
| 258 | |
| 259 | Status Wait() { |
| 260 | mutex_lock l(mu_); |
| 261 | // TODO(mrry): Propagate a timeout here, since `num_pending_` may |
| 262 | // never become zero. |
| 263 | while (num_pending_ != 0) { |
| 264 | pending_zero_.wait_for(l, std::chrono::milliseconds(kLoggingPeriodMs)); |
| 265 | if (num_pending_ != 0) { |
| 266 | for (size_t i = 0; i < targets_.size(); ++i) { |
| 267 | if (!seen_targets_[i]) { |
| 268 | LOG(INFO) |
| 269 | << "CreateSession still waiting for response from worker: " |
| 270 | << targets_[i]; |
| 271 | } |
| 272 | } |
| 273 | } |
| 274 | } |
| 275 | return status_; |
| 276 | } |
| 277 | |
| 278 | // The caller takes the ownership of returned remote devices. |
| 279 | void GetRemoteDevices(const std::vector<Device*>& local, |
no test coverage detected