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

Unified Diff: media/audio/audio_manager_base.cc

Issue 1011683002: Lazily initialize MessageLoop for faster thread startup (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: non-blocking thread_id() Created 5 years, 9 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
« base/threading/thread.cc ('K') | « content/public/test/test_browser_thread.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/audio_manager_base.cc
diff --git a/media/audio/audio_manager_base.cc b/media/audio/audio_manager_base.cc
index edaabf4c22771e71ef38a1fba14f4969e587141e..445972462c5e27f948cc1acf8aaff28aa7473f68 100644
--- a/media/audio/audio_manager_base.cc
+++ b/media/audio/audio_manager_base.cc
@@ -95,7 +95,14 @@ AudioManagerBase::AudioManagerBase(AudioLogFactory* audio_log_factory)
}
#endif
+#if defined(OS_WIN)
+ // We check COM initializer status right after calling this, so wait here
DaleCurtis 2015/03/26 00:12:38 Can you elaborate on why this is necessary? CoreAu
DaleCurtis 2015/04/16 16:41:07 Did you have a chance to dig into this further? If
+ // until we finish audio thread initialization (where we also run COM
+ // initializer).
+ CHECK(audio_thread_.StartAndWait());
+#else
CHECK(audio_thread_.Start());
+#endif
task_runner_ = audio_thread_.message_loop_proxy();
}
« base/threading/thread.cc ('K') | « content/public/test/test_browser_thread.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698