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

Unified Diff: remoting/base/auto_thread.cc

Issue 639233002: Remote assistance on Chrome OS Part IV - It2MeHost (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address feedbacks Created 6 years, 2 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: remoting/base/auto_thread.cc
diff --git a/remoting/base/auto_thread.cc b/remoting/base/auto_thread.cc
index b1d02790e4f655b0bfd8a531c54723b570d83eef..9092a6a7420444d7664156d99aa6cadd6289aaa8 100644
--- a/remoting/base/auto_thread.cc
+++ b/remoting/base/auto_thread.cc
@@ -113,6 +113,10 @@ AutoThread::~AutoThread() {
// Wait for the thread to exit.
if (!thread_.is_null()) {
+ // AutoThread only destroys itself when there are no outstanding references
+ // to its task runner. Therefore it is guaranteed that the join is
+ // non-blocking as its task runner will always be empty at shutdown.
Wez 2014/10/17 17:57:59 This guarantee actually doesn't hold if you do the
kelvinp 2014/10/20 00:21:16 Done.
+ base::ThreadRestrictions::ScopedAllowIO allow_io;
Wez 2014/10/17 17:57:59 I'd recommend making this change in a separate CL,
kelvinp 2014/10/20 00:21:16 I have already added jam on this CL.
base::PlatformThread::Join(thread_);
}
}

Powered by Google App Engine
This is Rietveld 408576698