OLD | NEW |
---|---|
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 THIRD_PARTY_WEBKIT_PUBLIC_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_H_ | 5 #ifndef THIRD_PARTY_WEBKIT_PUBLIC_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_H_ |
6 #define THIRD_PARTY_WEBKIT_PUBLIC_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_H_ | 6 #define THIRD_PARTY_WEBKIT_PUBLIC_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/optional.h" | 10 #include "base/optional.h" |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
213 // order greater than the fence from running until either the fence has been | 213 // order greater than the fence from running until either the fence has been |
214 // removed or a subsequent fence has unblocked some tasks within the queue. | 214 // removed or a subsequent fence has unblocked some tasks within the queue. |
215 // Note: delayed tasks get their enqueue order set once their delay has | 215 // Note: delayed tasks get their enqueue order set once their delay has |
216 // expired, and non-delayed tasks get their enqueue order set when posted. | 216 // expired, and non-delayed tasks get their enqueue order set when posted. |
217 virtual void InsertFence(InsertFencePosition position) = 0; | 217 virtual void InsertFence(InsertFencePosition position) = 0; |
218 | 218 |
219 // Removes any previously added fence and unblocks execution of any tasks | 219 // Removes any previously added fence and unblocks execution of any tasks |
220 // blocked by it. | 220 // blocked by it. |
221 virtual void RemoveFence() = 0; | 221 virtual void RemoveFence() = 0; |
222 | 222 |
223 virtual bool HasFence() const = 0; | |
224 | |
223 virtual bool BlockedByFence() const = 0; | 225 virtual bool BlockedByFence() const = 0; |
alex clarke (OOO till 29th)
2017/04/21 09:14:19
Please add: // Returns true if the queue has a fe
altimin
2017/04/25 13:22:36
Done.
| |
224 | 226 |
225 virtual void SetObserver(Observer* observer) = 0; | 227 virtual void SetObserver(Observer* observer) = 0; |
226 | 228 |
227 protected: | 229 protected: |
228 ~TaskQueue() override {} | 230 ~TaskQueue() override {} |
229 | 231 |
230 DISALLOW_COPY_AND_ASSIGN(TaskQueue); | 232 DISALLOW_COPY_AND_ASSIGN(TaskQueue); |
231 }; | 233 }; |
232 | 234 |
233 } // namespace scheduler | 235 } // namespace scheduler |
234 } // namespace blink | 236 } // namespace blink |
235 | 237 |
236 #endif // THIRD_PARTY_WEBKIT_PUBLIC_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_H_ | 238 #endif // THIRD_PARTY_WEBKIT_PUBLIC_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_H_ |
OLD | NEW |