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

Method AddHold

tensorflow/core/framework/op_segment.cc:74–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72}
73
74void OpSegment::AddHold(const string& session_handle) {
75 mutex_lock l(mu_);
76 Item** item = &sessions_[session_handle];
77 if (*item == nullptr) {
78 *item = new Item; // num_holds == 1
79 } else {
80 ++((*item)->num_holds);
81 }
82}
83
84void OpSegment::RemoveHold(const string& session_handle) {
85 Item* item = nullptr;

Callers 3

TEST_FFunction · 0.80
DirectSessionMethod · 0.80
InitItemMethod · 0.80

Calls

no outgoing calls

Tested by 1

TEST_FFunction · 0.64