| 300 | } |
| 301 | |
| 302 | bool ThreadMgr::GetThreadNameByTid(int64_t tid, string* name) { |
| 303 | DCHECK(name != nullptr); |
| 304 | lock_guard<mutex> l(lock_); |
| 305 | for (const ThreadCategoryMap::value_type& category : thread_categories_) { |
| 306 | for (const auto& thread : category.second.threads_by_id) { |
| 307 | if (thread.second.thread_id() == tid) { |
| 308 | *name = thread.second.name(); |
| 309 | return true; |
| 310 | } |
| 311 | } |
| 312 | } |
| 313 | return false; |
| 314 | } |
| 315 | |
| 316 | Status Thread::StartThread(const std::string& category, const std::string& name, |
| 317 | const ThreadFunctor& functor, unique_ptr<Thread>* thread, |
no test coverage detected