Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(192)

Unified Diff: base/threading/thread.cc

Issue 11438022: Add ability to retrieve a thread_name given a thread_id. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: API and various other cleanups based on review feedback. Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: base/threading/thread.cc
diff --git a/base/threading/thread.cc b/base/threading/thread.cc
index 8e506ef4ec7347b4d0154717b2bac0ec21cedc00..9bc78b47ce08de6ef9c23668e4ddacf303f70a98 100644
--- a/base/threading/thread.cc
+++ b/base/threading/thread.cc
@@ -7,6 +7,7 @@
#include "base/bind.h"
#include "base/lazy_instance.h"
#include "base/third_party/dynamic_annotations/dynamic_annotations.h"
+#include "base/threading/thread_id_name_manager.h"
#include "base/threading/thread_local.h"
#include "base/threading/thread_restrictions.h"
#include "base/synchronization/waitable_event.h"
@@ -65,6 +66,7 @@ Thread::Thread(const char* name)
Thread::~Thread() {
Stop();
+ ThreadIdNameManager::GetInstance()->RemoveNameForId(thread_id_);
jar (doing other things) 2013/01/24 01:05:14 I would have expected that you'd leak this. Is th
dsinclair 2013/01/24 15:13:06 The RemoveNameForId will remove the thread_id -> n
}
bool Thread::Start() {

Powered by Google App Engine
This is Rietveld 408576698