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

Unified Diff: base/message_loop/message_loop.h

Issue 2235283002: Fix incorrect memory barrier usage I previously asked to be introduced. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
« no previous file with comments | « no previous file | base/message_loop/message_loop.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/message_loop/message_loop.h
diff --git a/base/message_loop/message_loop.h b/base/message_loop/message_loop.h
index d8eae01dd5b27d16edb6a1c3f8d5557392f3d751..9b0a51df9dcef0326e3876f50036f4a5dd5afa69 100644
--- a/base/message_loop/message_loop.h
+++ b/base/message_loop/message_loop.h
@@ -301,9 +301,11 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate {
// Returns the type passed to the constructor.
Type type() const { return type_; }
- // Returns the name of the thread this message loop is bound to.
- // This function is only valid when this message loop is running and
- // BindToCurrentThread has already been called.
+ // Returns the name of the thread this message loop is bound to. This function
+ // is only valid when this message loop is running, BindToCurrentThread has
+ // already been called and has an "happens-before" relationship with this call
+ // (this relationship is obtained implicitly by the MessageLoop's task posting
+ // system unless calling this very early).
std::string GetThreadName() const;
// Gets the TaskRunner associated with this message loop.
@@ -552,7 +554,8 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate {
scoped_refptr<SingleThreadTaskRunner> task_runner_;
std::unique_ptr<ThreadTaskRunnerHandle> thread_task_runner_handle_;
- // Id of the thread this message loop is bound to.
+ // Id of the thread this message loop is bound to. Initialized once when the
+ // MessageLoop is bound to its thread and constant forever after.
PlatformThreadId thread_id_;
#if !(defined(OS_MACOSX) && !defined(OS_IOS))
« no previous file with comments | « no previous file | base/message_loop/message_loop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698