diff options
-rw-r--r-- | base/message_loop_proxy.h | 9 | ||||
-rw-r--r-- | base/thread.h | 2 |
2 files changed, 6 insertions, 5 deletions
diff --git a/base/message_loop_proxy.h b/base/message_loop_proxy.h index 20e9e10..5d6708e 100644 --- a/base/message_loop_proxy.h +++ b/base/message_loop_proxy.h @@ -15,13 +15,15 @@ namespace base { struct MessageLoopProxyTraits; // This class provides a thread-safe refcounted interface to the Post* methods -// of a message loop. This class can outlive the target message loop. +// of a message loop. This class can outlive the target message loop. You can +// obtain a MessageLoopProxy via Thread::message_loop_proxy(). class MessageLoopProxy : public base::RefCountedThreadSafe<MessageLoopProxy, MessageLoopProxyTraits> { public: - // These are the same methods in message_loop.h, but are guaranteed to either - // get posted to the MessageLoop if it's still alive, or be deleted otherwise. + // These methods are the same as in message_loop.h, but are guaranteed to + // either post the Task to the MessageLoop (if it's still alive), or to + // delete the Task otherwise. // They return true iff the thread existed and the task was posted. Note that // even if the task is posted, there's no guarantee that it will run, since // the target thread may already have a Quit message in its queue. @@ -74,4 +76,3 @@ struct MessageLoopProxyTraits { } // namespace base #endif // BASE_MESSAGE_LOOP_PROXY_H_ - diff --git a/base/thread.h b/base/thread.h index cf8a69a..572eb8a 100644 --- a/base/thread.h +++ b/base/thread.h @@ -108,7 +108,7 @@ class Thread : PlatformThread::Delegate { // Returns a MessageLoopProxy for this thread. Use the MessageLoopProxy's // PostTask methods to execute code on the thread. This only returns - // non-null after a successful call to Start. After Stop has been called, + // non-NULL after a successful call to Start. After Stop has been called, // this will return NULL. Callers can hold on to this even after the thread // is gone. // TODO(sanjeevr): Look into merging MessageLoop and MessageLoopProxy. |