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

Side by Side Diff: mojo/public/cpp/utility/run_loop.h

Issue 795593004: Update mojo sdk to rev cc531b32182099a5a034a99daff35ed5d38a61c8 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More workarounds for MSVC Created 5 years, 11 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 | « mojo/public/cpp/utility/lib/run_loop.cc ('k') | mojo/public/cpp/utility/tests/BUILD.gn » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_UTILITY_RUN_LOOP_H_ 5 #ifndef MOJO_PUBLIC_CPP_UTILITY_RUN_LOOP_H_
6 #define MOJO_PUBLIC_CPP_UTILITY_RUN_LOOP_H_ 6 #define MOJO_PUBLIC_CPP_UTILITY_RUN_LOOP_H_
7 7
8 #include <map> 8 #include <map>
9 #include <queue> 9 #include <queue>
10 10
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 // a task must be run or |non_blocking| is true, in which case it will also 96 // a task must be run or |non_blocking| is true, in which case it will also
97 // return if no task is registered and servicing at least one handle would 97 // return if no task is registered and servicing at least one handle would
98 // require blocking. Returns true if a RunLoopHandler was notified. 98 // require blocking. Returns true if a RunLoopHandler was notified.
99 bool Wait(bool non_blocking); 99 bool Wait(bool non_blocking);
100 100
101 // Notifies handlers of |error|. If |check| == CHECK_DEADLINE, this will 101 // Notifies handlers of |error|. If |check| == CHECK_DEADLINE, this will
102 // only notify handlers whose deadline has expired and skips the rest. 102 // only notify handlers whose deadline has expired and skips the rest.
103 // Returns true if a RunLoopHandler was notified. 103 // Returns true if a RunLoopHandler was notified.
104 bool NotifyHandlers(MojoResult error, CheckDeadline check); 104 bool NotifyHandlers(MojoResult error, CheckDeadline check);
105 105
106 // Removes the first invalid handle. This is called if MojoWaitMany() finds an
107 // invalid handle. Returns true if a RunLoopHandler was notified.
108 bool RemoveFirstInvalidHandle(const WaitState& wait_state);
109
110 // Returns the state needed to pass to WaitMany(). 106 // Returns the state needed to pass to WaitMany().
111 WaitState GetWaitState(bool non_blocking) const; 107 WaitState GetWaitState(bool non_blocking) const;
112 108
113 HandleToHandlerData handler_data_; 109 HandleToHandlerData handler_data_;
114 110
115 // If non-null we're running (inside Run()). Member references a value on the 111 // If non-null we're running (inside Run()). Member references a value on the
116 // stack. 112 // stack.
117 RunState* run_state_; 113 RunState* run_state_;
118 114
119 // An ever increasing value assigned to each HandlerData::id. Used to detect 115 // An ever increasing value assigned to each HandlerData::id. Used to detect
(...skipping 20 matching lines...) Expand all
140 uint64_t next_sequence_number_; 136 uint64_t next_sequence_number_;
141 typedef std::priority_queue<PendingTask> DelayedTaskQueue; 137 typedef std::priority_queue<PendingTask> DelayedTaskQueue;
142 DelayedTaskQueue delayed_tasks_; 138 DelayedTaskQueue delayed_tasks_;
143 139
144 MOJO_DISALLOW_COPY_AND_ASSIGN(RunLoop); 140 MOJO_DISALLOW_COPY_AND_ASSIGN(RunLoop);
145 }; 141 };
146 142
147 } // namespace mojo 143 } // namespace mojo
148 144
149 #endif // MOJO_PUBLIC_CPP_UTILITY_RUN_LOOP_H_ 145 #endif // MOJO_PUBLIC_CPP_UTILITY_RUN_LOOP_H_
OLDNEW
« no previous file with comments | « mojo/public/cpp/utility/lib/run_loop.cc ('k') | mojo/public/cpp/utility/tests/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698