summaryrefslogtreecommitdiffstats
path: root/base/thread.cc
diff options
context:
space:
mode:
Diffstat (limited to 'base/thread.cc')
-rw-r--r--base/thread.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/base/thread.cc b/base/thread.cc
index 387b1c5..9bc81a4 100644
--- a/base/thread.cc
+++ b/base/thread.cc
@@ -143,14 +143,13 @@ void Thread::ThreadMain() {
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.