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

Side by Side Diff: mojo/public/cpp/bindings/lib/multiplex_router.h

Issue 1808583003: Mojo C++ bindings: MultiplexRouter more aggressively dispatch queued messages. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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/public/cpp/bindings/lib/multiplex_router.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_PUBLIC_CPP_BINDINGS_LIB_MULTIPLEX_ROUTER_H_ 5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_LIB_MULTIPLEX_ROUTER_H_
6 #define MOJO_PUBLIC_CPP_BINDINGS_LIB_MULTIPLEX_ROUTER_H_ 6 #define MOJO_PUBLIC_CPP_BINDINGS_LIB_MULTIPLEX_ROUTER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <deque> 10 #include <deque>
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 // If |force_async| is true, it guarantees not to call any 167 // If |force_async| is true, it guarantees not to call any
168 // InterfaceEndpointClient methods directly. 168 // InterfaceEndpointClient methods directly.
169 // 169 //
170 // Note: Because calling into InterfaceEndpointClient may lead to destruction 170 // Note: Because calling into InterfaceEndpointClient may lead to destruction
171 // of this object, if |force_async| is set to false, the caller needs to hold 171 // of this object, if |force_async| is set to false, the caller needs to hold
172 // on to a ref outside of |lock_| before calling this method. 172 // on to a ref outside of |lock_| before calling this method.
173 void ProcessTasks(bool force_async); 173 void ProcessTasks(bool force_async);
174 174
175 // Returns true to indicate that |task| has been processed. Otherwise the task 175 // Returns true to indicate that |task| has been processed. Otherwise the task
176 // will be added back to the front of the queue. 176 // will be added back to the front of the queue.
177 // |*force_async| may be set to true to force subsequent tasks being processed 177 bool ProcessNotifyErrorTask(Task* task, bool force_async);
178 // in an asynchronous manner. 178 bool ProcessIncomingMessageTask(Task* task, bool force_async);
179 bool ProcessNotifyErrorTask(Task* task, bool* force_async);
180 bool ProcessIncomingMessageTask(Task* task, bool* force_async);
181 179
182 void LockAndCallProcessTasks(); 180 void LockAndCallProcessTasks();
183 181
184 // Updates the state of |endpoint|. If both the endpoint and its peer have 182 // Updates the state of |endpoint|. If both the endpoint and its peer have
185 // been closed, removes it from |endpoints_|. 183 // been closed, removes it from |endpoints_|.
186 // NOTE: The method may invalidate |endpoint|. 184 // NOTE: The method may invalidate |endpoint|.
187 enum EndpointStateUpdateType { ENDPOINT_CLOSED, PEER_ENDPOINT_CLOSED }; 185 enum EndpointStateUpdateType { ENDPOINT_CLOSED, PEER_ENDPOINT_CLOSED };
188 void UpdateEndpointStateMayRemove(InterfaceEndpoint* endpoint, 186 void UpdateEndpointStateMayRemove(InterfaceEndpoint* endpoint,
189 EndpointStateUpdateType type); 187 EndpointStateUpdateType type);
190 188
(...skipping 21 matching lines...) Expand all
212 210
213 bool testing_mode_; 211 bool testing_mode_;
214 212
215 DISALLOW_COPY_AND_ASSIGN(MultiplexRouter); 213 DISALLOW_COPY_AND_ASSIGN(MultiplexRouter);
216 }; 214 };
217 215
218 } // namespace internal 216 } // namespace internal
219 } // namespace mojo 217 } // namespace mojo
220 218
221 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_MULTIPLEX_ROUTER_H_ 219 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_MULTIPLEX_ROUTER_H_
OLDNEW
« no previous file with comments | « no previous file | mojo/public/cpp/bindings/lib/multiplex_router.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698