Index: third_party/WebKit/Source/platform/scheduler/base/enqueue_order.h |
diff --git a/third_party/WebKit/Source/platform/scheduler/base/enqueue_order.h b/third_party/WebKit/Source/platform/scheduler/base/enqueue_order.h |
index 6318555718ac07995c56513f46a3c797a4adf019..ab0ea1d5d835d7f1f9d8d7724bddde7c4af98693 100644 |
--- a/third_party/WebKit/Source/platform/scheduler/base/enqueue_order.h |
+++ b/third_party/WebKit/Source/platform/scheduler/base/enqueue_order.h |
@@ -15,13 +15,20 @@ namespace internal { |
using EnqueueOrder = uint64_t; |
+// A 64bit integer used to provide ordering of tasks. |
Sami
2016/08/18 15:53:43
Should we also mention we don't support these wrap
alex clarke (OOO till 29th)
2016/08/18 16:51:41
Done.
|
class EnqueueOrderGenerator { |
public: |
EnqueueOrderGenerator(); |
~EnqueueOrderGenerator(); |
+ // Returns a monotonically increasing integer, starting from one. Can be |
+ // called from any thread. |
EnqueueOrder GenerateNext(); |
+ static bool isValidEnqueueOrder(EnqueueOrder enqueue_order) { |
Sami
2016/08/18 15:53:43
nit: IsValidEnqueueOrder
alex clarke (OOO till 29th)
2016/08/18 16:51:41
Done.
|
+ return enqueue_order != 0ull; |
+ } |
+ |
private: |
base::Lock lock_; |
EnqueueOrder enqueue_order_; |