| 206 | } |
| 207 | |
| 208 | void ThreadMgr::AddThread(const thread::id& thread, const string& name, |
| 209 | const string& category, int64_t tid) { |
| 210 | lock_guard<mutex> l(lock_); |
| 211 | ThreadCategory& thread_category = thread_categories_[category]; |
| 212 | thread_category.threads_by_id[thread] = ThreadDescriptor(category, name, tid); |
| 213 | ++thread_category.num_threads_created; |
| 214 | if (metrics_enabled_) { |
| 215 | current_num_threads_metric_->Increment(1L); |
| 216 | total_threads_metric_->Increment(1L); |
| 217 | } |
| 218 | } |
| 219 | |
| 220 | void ThreadMgr::RemoveThread(const thread::id& boost_id, const string& category) { |
| 221 | lock_guard<mutex> l(lock_); |
no test coverage detected