MCPcopy Create free account
hub / github.com/apache/impala / GetThreadNameByTid

Method GetThreadNameByTid

be/src/util/thread.cc:302–314  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

300}
301
302bool 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
316Status Thread::StartThread(const std::string& category, const std::string& name,
317 const ThreadFunctor& functor, unique_ptr<Thread>* thread,

Callers 1

GetThreadNameByTidFunction · 0.80

Calls 2

thread_idMethod · 0.45
nameMethod · 0.45

Tested by

no test coverage detected