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

Method WorkerThread

tensorflow/core/platform/cloud/gcs_dns_cache.cc:155–174  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

153}
154
155void GcsDnsCache::WorkerThread() {
156 while (true) {
157 {
158 // Don't immediately re-resolve the addresses.
159 mutex_lock l(mu_);
160 if (cancelled_) return;
161 cond_var_.wait_for(l, std::chrono::seconds(refresh_rate_secs_));
162 if (cancelled_) return;
163 }
164
165 // Resolve DNS values
166 auto new_addresses = ResolveNames(kCachedDomainNames);
167
168 {
169 mutex_lock l(mu_);
170 // Update instance variables.
171 addresses_.swap(new_addresses);
172 }
173 }
174}
175
176} // namespace tensorflow

Callers

nothing calls this directly

Calls 2

wait_forMethod · 0.80
swapMethod · 0.45

Tested by

no test coverage detected