MCPcopy Create free account
hub / github.com/Oneflow-Inc/oneflow / ClearSessionId

Function ClearSessionId

oneflow/core/framework/session_util.cpp:56–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54}
55
56bool ClearSessionId(int64_t session_id) {
57 std::unique_lock<std::mutex> lock(*GlobalSessionUtilMutex());
58 auto* regsitered_ids = RegsiteredSessionIds();
59 auto itor = std::find(regsitered_ids->begin(), regsitered_ids->end(), session_id);
60 if (itor == regsitered_ids->end()) { return false; }
61 regsitered_ids->erase(itor);
62 return true;
63}
64
65} // namespace oneflow

Callers 1

~OneFlowEnvMethod · 0.85

Calls 4

GlobalSessionUtilMutexFunction · 0.85
RegsiteredSessionIdsFunction · 0.85
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected