MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / Wait

Method Wait

tensorflow/core/distributed_runtime/master.cc:259–276  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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,

Callers 1

GetRemoteDevicesMethod · 0.45

Calls 2

wait_forMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected