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

Unified Diff: base/threading/simple_thread.cc

Issue 14634009: Move Thread Name Mapping into ThreadFunc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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/simple_thread.cc
diff --git a/base/threading/simple_thread.cc b/base/threading/simple_thread.cc
index 028d4f4ab23e2cf1ed971d50f2ac6c26fdca0036..4f82c883209e3a463802768399da9d13141e0b55 100644
--- a/base/threading/simple_thread.cc
+++ b/base/threading/simple_thread.cc
@@ -7,6 +7,7 @@
#include "base/logging.h"
#include "base/strings/string_number_conversions.h"
#include "base/threading/platform_thread.h"
+#include "base/threading/thread_id_name_manager.h"
#include "base/threading/thread_restrictions.h"
namespace base {
@@ -39,6 +40,7 @@ void SimpleThread::Join() {
DCHECK(HasBeenStarted()) << "Tried to Join a never-started thread.";
DCHECK(!HasBeenJoined()) << "Tried to Join a thread multiple times.";
PlatformThread::Join(thread_);
+ ThreadIdNameManager::GetInstance()->RemoveName(&thread_, tid_);
jar (doing other things) 2013/05/22 19:37:56 This still scares me a bit if I'm worried about ra
dsinclair 2013/05/22 20:22:31 The ThreadIdNameManager code takes care of this. W
joined_ = true;
}

Powered by Google App Engine
This is Rietveld 408576698