| 103 | } |
| 104 | |
| 105 | SessionTCB::ptr_t Context::thisThread() { |
| 106 | if (!session_threads_.count(std::this_thread::get_id())) { |
| 107 | session_threads_.insert({std::this_thread::get_id(), std::make_shared<SessionTCB>()}); |
| 108 | std::stringstream ss; |
| 109 | ss << std::this_thread::get_id(); |
| 110 | MLLM_WARN( |
| 111 | "This control thread did not registered a SessionTCB in Context. The Context will automatically create one for you. " |
| 112 | "But it is recommend to create SessionTCB manually. THREAD ID: {}", |
| 113 | ss.str()); |
| 114 | } |
| 115 | return session_threads_[std::this_thread::get_id()]; |
| 116 | } |
| 117 | |
| 118 | SessionTCB::ptr_t Context::mainThread() { return main_thread_; } |
| 119 |
no test coverage detected