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

Side by Side Diff: base/threading/thread.h

Issue 8463004: A couple comment updates (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: jar comments Created 9 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | base/threading/worker_pool_posix.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_THREAD_H_ 5 #ifndef BASE_THREAD_H_
6 #define BASE_THREAD_H_ 6 #define BASE_THREAD_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 // Returns a MessageLoopProxy for this thread. Use the MessageLoopProxy's 115 // Returns a MessageLoopProxy for this thread. Use the MessageLoopProxy's
116 // PostTask methods to execute code on the thread. This only returns 116 // PostTask methods to execute code on the thread. This only returns
117 // non-NULL after a successful call to Start. After Stop has been called, 117 // non-NULL after a successful call to Start. After Stop has been called,
118 // this will return NULL. Callers can hold on to this even after the thread 118 // this will return NULL. Callers can hold on to this even after the thread
119 // is gone. 119 // is gone.
120 // TODO(sanjeevr): Look into merging MessageLoop and MessageLoopProxy. 120 // TODO(sanjeevr): Look into merging MessageLoop and MessageLoopProxy.
121 scoped_refptr<MessageLoopProxy> message_loop_proxy() const { 121 scoped_refptr<MessageLoopProxy> message_loop_proxy() const {
122 return message_loop_->message_loop_proxy(); 122 return message_loop_->message_loop_proxy();
123 } 123 }
124 124
125 // Set the name of this thread (for display in debugger too). 125 // Returns the name of this thread (for display in debugger too).
126 const std::string &thread_name() { return name_; } 126 const std::string &thread_name() { return name_; }
127 127
128 // The native thread handle. 128 // The native thread handle.
129 PlatformThreadHandle thread_handle() { return thread_; } 129 PlatformThreadHandle thread_handle() { return thread_; }
130 130
131 // The thread ID. 131 // The thread ID.
132 PlatformThreadId thread_id() const { return thread_id_; } 132 PlatformThreadId thread_id() const { return thread_id_; }
133 133
134 // Returns true if the thread has been started, and not yet stopped. 134 // Returns true if the thread has been started, and not yet stopped.
135 // When a thread is running, |thread_id_| is a valid id. 135 // When a thread is running, |thread_id_| is a valid id.
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 std::string name_; 183 std::string name_;
184 184
185 friend class ThreadQuitTask; 185 friend class ThreadQuitTask;
186 186
187 DISALLOW_COPY_AND_ASSIGN(Thread); 187 DISALLOW_COPY_AND_ASSIGN(Thread);
188 }; 188 };
189 189
190 } // namespace base 190 } // namespace base
191 191
192 #endif // BASE_THREAD_H_ 192 #endif // BASE_THREAD_H_
OLDNEW
« no previous file with comments | « no previous file | base/threading/worker_pool_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698