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

Unified Diff: base/thread.cc

Issue 18508: Moved Init() startup_data_->event.Signal() because derived classes may... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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
« no previous file with comments | « no previous file | base/thread_unittest.cc » ('j') | base/thread_unittest.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/thread.cc
===================================================================
--- base/thread.cc (revision 8282)
+++ base/thread.cc (working copy)
@@ -143,13 +143,14 @@
message_loop.set_thread_name(name_);
message_loop_ = &message_loop;
+ // Let the thread do extra initialization.
+ // Let's do this before signaling we are started.
+ Init();
+
startup_data_->event.Signal();
// startup_data_ can't be touched anymore since the starting thread is now
// unlocked.
- // Let the thread do extra initialization.
- Init();
-
message_loop.Run();
// Let the thread do extra cleanup.
« no previous file with comments | « no previous file | base/thread_unittest.cc » ('j') | base/thread_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698