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

Side by Side Diff: mojo/edk/system/node_controller.h

Issue 2209733002: [mojo-edk] Prevent AcceptIncomingMessages flushing aggressively (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
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 unified diff | Download patch
« no previous file with comments | « no previous file | mojo/edk/system/node_controller.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 MOJO_EDK_SYSTEM_NODE_CONTROLLER_H_ 5 #ifndef MOJO_EDK_SYSTEM_NODE_CONTROLLER_H_
6 #define MOJO_EDK_SYSTEM_NODE_CONTROLLER_H_ 6 #define MOJO_EDK_SYSTEM_NODE_CONTROLLER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <queue> 9 #include <queue>
10 #include <unordered_map> 10 #include <unordered_map>
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 // A queue of pending child names waiting to be connected to a broker. 270 // A queue of pending child names waiting to be connected to a broker.
271 std::queue<ports::NodeName> pending_broker_clients_; 271 std::queue<ports::NodeName> pending_broker_clients_;
272 272
273 // Messages waiting to be relayed by the broker once it's known. 273 // Messages waiting to be relayed by the broker once it's known.
274 std::unordered_map<ports::NodeName, OutgoingMessageQueue> 274 std::unordered_map<ports::NodeName, OutgoingMessageQueue>
275 pending_relay_messages_; 275 pending_relay_messages_;
276 276
277 // Guards |incoming_messages_|. 277 // Guards |incoming_messages_|.
278 base::Lock messages_lock_; 278 base::Lock messages_lock_;
279 std::queue<ports::ScopedMessage> incoming_messages_; 279 std::queue<ports::ScopedMessage> incoming_messages_;
280 // Flag to fast-path checking |incoming_messages_|.
281 AtomicFlag incoming_messages_flag_;
282 280
283 // Guards |shutdown_callback_|. 281 // Guards |shutdown_callback_|.
284 base::Lock shutdown_lock_; 282 base::Lock shutdown_lock_;
285 283
286 // Set by RequestShutdown(). If this is non-null, the controller will 284 // Set by RequestShutdown(). If this is non-null, the controller will
287 // begin polling the Node to see if clean shutdown is possible any time the 285 // begin polling the Node to see if clean shutdown is possible any time the
288 // Node's state is modified by the controller. 286 // Node's state is modified by the controller.
289 base::Closure shutdown_callback_; 287 base::Closure shutdown_callback_;
290 // Flag to fast-path checking |shutdown_callback_|. 288 // Flag to fast-path checking |shutdown_callback_|.
291 AtomicFlag shutdown_callback_flag_; 289 AtomicFlag shutdown_callback_flag_;
(...skipping 19 matching lines...) Expand all
311 std::unique_ptr<MachPortRelay> mach_port_relay_; 309 std::unique_ptr<MachPortRelay> mach_port_relay_;
312 #endif 310 #endif
313 311
314 DISALLOW_COPY_AND_ASSIGN(NodeController); 312 DISALLOW_COPY_AND_ASSIGN(NodeController);
315 }; 313 };
316 314
317 } // namespace edk 315 } // namespace edk
318 } // namespace mojo 316 } // namespace mojo
319 317
320 #endif // MOJO_EDK_SYSTEM_NODE_CONTROLLER_H_ 318 #endif // MOJO_EDK_SYSTEM_NODE_CONTROLLER_H_
OLDNEW
« 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