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

Method Cleanup

tensorflow/contrib/star/star_worker_service.cc:279–299  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

277}
278
279void StarWorker::Cleanup(int64 step_id) {
280 if (env()->lockless) {
281 if (--pending_graph_count_[step_id] == 0) {
282 pending_graph_count_.erase(step_id);
283 env()->rendezvous_mgr->Cleanup(step_id);
284 }
285 return;
286 }
287
288 int left = -1;
289 {
290 mutex_lock l(graph_count_mu_);
291 left = --pending_graph_count_[step_id];
292 if (left == 0) {
293 pending_graph_count_.erase(step_id);
294 }
295 }
296 if (left == 0) {
297 env()->rendezvous_mgr->Cleanup(step_id);
298 }
299}
300
301void StarWorker::StarRunGraphAsync(StarRunGraphRequest* request,
302 StarRunGraphResponse* response,

Callers 1

StarRunGraphHandlerMethod · 0.45

Calls 2

envFunction · 0.50
eraseMethod · 0.45

Tested by

no test coverage detected