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

Unified Diff: mojo/edk/system/node_controller.h

Issue 2138343002: [mojo-edk] Ensure there is only one ProcessIncomingMessages() task posted to the IO thread. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comment changes. Created 4 years, 5 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 | mojo/edk/system/node_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/node_controller.h
diff --git a/mojo/edk/system/node_controller.h b/mojo/edk/system/node_controller.h
index c96b4f4405abfbffc79c0f666699b9b9e601c91e..8569834d1851d9d4417a82f306e9dfc3874e8a23 100644
--- a/mojo/edk/system/node_controller.h
+++ b/mojo/edk/system/node_controller.h
@@ -275,9 +275,12 @@ class NodeController : public ports::NodeDelegate,
std::unordered_map<ports::NodeName, OutgoingMessageQueue>
pending_relay_messages_;
- // Guards |incoming_messages_|.
+ // Guards |incoming_messages_| and |incoming_messages_task_posted_|.
base::Lock messages_lock_;
std::queue<ports::ScopedMessage> incoming_messages_;
+ // Ensures that there is only one incoming messages task posted to the IO
+ // thread.
+ bool incoming_messages_task_posted_ = false;
// Flag to fast-path checking |incoming_messages_|.
AtomicFlag incoming_messages_flag_;
« no previous file with comments | « no previous file | mojo/edk/system/node_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698