diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-11-18 16:35:47 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-11-18 15:45:54 +0000 |
commit | 32f5a1c56531e4210bc4cf8d8c7825d66e081888 (patch) | |
tree | eeeec6822f4d738d8454525233fd0e2e3a659e6d /chromium/base/task/thread_pool/priority_queue.h | |
parent | 99677208ff3b216fdfec551fbe548da5520cd6fb (diff) |
BASELINE: Update Chromium to 87.0.4280.67
Change-Id: Ib157360be8c2ffb2c73125751a89f60e049c1d54
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/base/task/thread_pool/priority_queue.h')
-rw-r--r-- | chromium/base/task/thread_pool/priority_queue.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/chromium/base/task/thread_pool/priority_queue.h b/chromium/base/task/thread_pool/priority_queue.h index d4d88842126..b5ae7086595 100644 --- a/chromium/base/task/thread_pool/priority_queue.h +++ b/chromium/base/task/thread_pool/priority_queue.h @@ -12,8 +12,8 @@ #include "base/memory/ref_counted.h" #include "base/task/common/checked_lock.h" #include "base/task/common/intrusive_heap.h" -#include "base/task/thread_pool/sequence_sort_key.h" #include "base/task/thread_pool/task_source.h" +#include "base/task/thread_pool/task_source_sort_key.h" namespace base { namespace internal { @@ -27,14 +27,14 @@ class BASE_EXPORT PriorityQueue { PriorityQueue& operator=(PriorityQueue&& other); - // Inserts |task_source| in the PriorityQueue with |sequence_sort_key|. + // Inserts |task_source| in the PriorityQueue with |task_source_sort_key|. void Push(TransactionWithRegisteredTaskSource transaction_with_task_source); - // Returns a reference to the SequenceSortKey representing the priority of + // Returns a reference to the TaskSourceSortKey representing the priority of // the highest pending task in this PriorityQueue. The reference becomes // invalid the next time that this PriorityQueue is modified. // Cannot be called on an empty PriorityQueue. - const SequenceSortKey& PeekSortKey() const; + const TaskSourceSortKey& PeekSortKey() const; // Returns a reference to the highest priority TaskSource in this // PriorityQueue. Cannot be called on an empty PriorityQueue. The returned @@ -51,10 +51,10 @@ class BASE_EXPORT PriorityQueue { // empty. RegisteredTaskSource RemoveTaskSource(const TaskSource& task_source); - // Updates the sort key of the TaskSource in |transaction| to - // match its current traits. No-ops if the TaskSource is not in the - // PriorityQueue or the PriorityQueue is empty. - void UpdateSortKey(TaskSource::Transaction transaction); + // Updates the sort key of |task_source| to |sort_key|, reordering + // |task_source| in the queue if necessary. No-ops if the TaskSource is not in + // the PriorityQueue or the PriorityQueue is empty. + void UpdateSortKey(const TaskSource& task_source, TaskSourceSortKey sort_key); // Returns true if the PriorityQueue is empty. bool IsEmpty() const; @@ -73,8 +73,8 @@ class BASE_EXPORT PriorityQueue { void EnableFlushTaskSourcesOnDestroyForTesting(); private: - // A class combining a TaskSource and the SequenceSortKey that determines its - // position in a PriorityQueue. + // A class combining a TaskSource and the TaskSourceSortKey that determines + // its position in a PriorityQueue. class TaskSourceAndSortKey; using ContainerType = IntrusiveHeap<TaskSourceAndSortKey>; |