OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef BASE_THREADING_THREAD_H_ | 5 #ifndef BASE_THREADING_THREAD_H_ |
6 #define BASE_THREADING_THREAD_H_ | 6 #define BASE_THREADING_THREAD_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/base_export.h" | 10 #include "base/base_export.h" |
11 #include "base/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
12 #include "base/message_loop/message_loop_proxy.h" | 12 #include "base/message_loop/message_loop_proxy.h" |
13 #include "base/threading/platform_thread.h" | 13 #include "base/threading/platform_thread.h" |
14 | 14 |
15 namespace base { | 15 namespace base { |
16 | 16 |
17 // A simple thread abstraction that establishes a MessageLoop on a new thread. | 17 // A simple thread abstraction that establishes a MessageLoop on a new thread. |
18 // The consumer uses the MessageLoop of the thread to cause code to execute on | 18 // The consumer uses the MessageLoop of the thread to cause code to execute on |
19 // the thread. When this object is destroyed the thread is terminated. All | 19 // the thread. When this object is destroyed the thread is terminated. All |
20 // pending tasks queued on the thread's message loop will run to completion | 20 // pending tasks queued on the thread's message loop will run to completion |
21 // before the thread is terminated. | 21 // before the thread is terminated. |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 std::string name_; | 207 std::string name_; |
208 | 208 |
209 friend void ThreadQuitHelper(); | 209 friend void ThreadQuitHelper(); |
210 | 210 |
211 DISALLOW_COPY_AND_ASSIGN(Thread); | 211 DISALLOW_COPY_AND_ASSIGN(Thread); |
212 }; | 212 }; |
213 | 213 |
214 } // namespace base | 214 } // namespace base |
215 | 215 |
216 #endif // BASE_THREADING_THREAD_H_ | 216 #endif // BASE_THREADING_THREAD_H_ |
OLD | NEW |