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

Unified Diff: runtime/vm/thread_pool.cc

Issue 1439483003: - Add an OSThread structure which is the generic TLS structure for all C++ (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: tweak-comment Created 5 years, 1 month 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: runtime/vm/thread_pool.cc
diff --git a/runtime/vm/thread_pool.cc b/runtime/vm/thread_pool.cc
index d5472a661001541f0d95bb3d2474b173ef3e7d0d..ca2e4bf478a83d1645ee5184826a3e31d4dde029 100644
--- a/runtime/vm/thread_pool.cc
+++ b/runtime/vm/thread_pool.cc
@@ -333,7 +333,9 @@ void ThreadPool::Worker::StartThread() {
ASSERT(task_ != NULL);
}
#endif
- int result = OSThread::Start(&Worker::Main, reinterpret_cast<uword>(this));
+ int result = OSThread::Start("Dart ThreadPool Worker",
+ &Worker::Main,
+ reinterpret_cast<uword>(this));
if (result != 0) {
FATAL1("Could not start worker thread: result = %d.", result);
}
@@ -417,9 +419,6 @@ void ThreadPool::Worker::Shutdown() {
// static
void ThreadPool::Worker::Main(uword args) {
- Thread::EnsureInit();
- Thread* thread = Thread::Current();
- thread->set_name("Dart ThreadPool Worker");
Worker* worker = reinterpret_cast<Worker*>(args);
ThreadId id = OSThread::GetCurrentThreadId();
ThreadJoinId join_id = OSThread::GetCurrentThreadJoinId();

Powered by Google App Engine
This is Rietveld 408576698