| 45 | } |
| 46 | |
| 47 | bool RegsterSessionId(int64_t session_id) { |
| 48 | std::unique_lock<std::mutex> lock(*GlobalSessionUtilMutex()); |
| 49 | auto* regsitered_ids = RegsiteredSessionIds(); |
| 50 | auto itor = std::find(regsitered_ids->begin(), regsitered_ids->end(), session_id); |
| 51 | if (itor != regsitered_ids->end()) { return false; } |
| 52 | regsitered_ids->push_back(session_id); |
| 53 | return true; |
| 54 | } |
| 55 | |
| 56 | bool ClearSessionId(int64_t session_id) { |
| 57 | std::unique_lock<std::mutex> lock(*GlobalSessionUtilMutex()); |
no test coverage detected