Chromium Code Reviews| 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_); |
| } |
| } |