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

Issue 1709713002: TaskScheduler [4/9] Priority Queue (Closed)

Created:
4 years, 10 months ago by fdoray
Modified:
4 years, 9 months ago
Reviewers:
robliao, danakj, gab, Nico
CC:
chromium-reviews, vmpstr+watch_chromium.org, jam
Base URL:
https://chromium.googlesource.com/chromium/src.git@s_2_sequence_and_task
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

TaskScheduler [4/9] Priority Queue This change is a subset of https://codereview.chromium.org/1698183005/ A PriorityQueue holds Sequences of Tasks. It supports Push, Pop and Peek operations through a Transaction object. A SequenceSortKey must be provided to push a Sequence into a PriorityQueue. Sequences are sorted according to their SequenceSortKey. The SequenceSortKey of a Sequence never changes while it is in the PriorityQueue (even if Tasks are pushed/popped from the Sequence). BUG=553459 Committed: https://crrev.com/6477fbded94522e26875bbf405710060d01ea971 Cr-Commit-Position: refs/heads/master@{#382115}

Patch Set 1 #

Total comments: 3

Patch Set 2 : format #

Patch Set 3 : self review. #

Total comments: 33

Patch Set 4 : address comments from robliao/gab #5-6 #

Patch Set 5 : self review. #

Total comments: 27

Patch Set 6 : address comments from robliao/gab #8-9 #

Patch Set 7 : fix indentation and comment. #

Total comments: 2

Patch Set 8 : simplify test #

Patch Set 9 : self review #

Total comments: 51

Patch Set 10 : CR from robliao #21 #

Patch Set 11 : add missing file #

Patch Set 12 : CR danakj #26 #

Patch Set 13 : self review #

Patch Set 14 : self review #

Total comments: 9

Patch Set 15 : CR danakj #31 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+501 lines, -7 lines) Patch
M base/BUILD.gn View 1 2 3 4 5 6 7 8 9 2 chunks +4 lines, -0 lines 0 comments Download
M base/base.gyp View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download
M base/base.gypi View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download
A base/task_scheduler/priority_queue.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +139 lines, -0 lines 0 comments Download
A base/task_scheduler/priority_queue.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +89 lines, -0 lines 0 comments Download
A base/task_scheduler/priority_queue_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +245 lines, -0 lines 0 comments Download
M base/task_scheduler/scheduler_lock_unittest.cc View 1 2 3 4 5 6 7 8 9 2 chunks +1 line, -7 lines 0 comments Download
A base/task_scheduler/test_utils.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +19 lines, -0 lines 0 comments Download

Messages

Total messages: 40 (10 generated)
fdoray
4 years, 10 months ago (2016-02-17 20:11:44 UTC) #1
gab
https://codereview.chromium.org/1709713002/diff/1/base/task_scheduler/priority_queue.h File base/task_scheduler/priority_queue.h (right): https://codereview.chromium.org/1709713002/diff/1/base/task_scheduler/priority_queue.h#newcode96 base/task_scheduler/priority_queue.h:96: using ContainerType = std::priority_queue<SequenceAndSortKeyPair, Looked into details of std::priority_queue ...
4 years, 10 months ago (2016-02-18 21:38:24 UTC) #4
robliao
https://codereview.chromium.org/1709713002/diff/40001/base/task_scheduler/priority_queue.cc File base/task_scheduler/priority_queue.cc (right): https://codereview.chromium.org/1709713002/diff/40001/base/task_scheduler/priority_queue.cc#newcode26 base/task_scheduler/priority_queue.cc:26: : lock_(&predecessor_priority_queue->lock_), Won't this line crash since predecessor_priority_queue == ...
4 years, 10 months ago (2016-02-23 02:10:58 UTC) #5
gab
lvg, only a couple of things + Rob's comments, will make another pass after that. ...
4 years, 10 months ago (2016-02-23 03:02:10 UTC) #6
fdoray
Can you take another look? Thanks. https://codereview.chromium.org/1709713002/diff/1/base/task_scheduler/priority_queue.h File base/task_scheduler/priority_queue.h (right): https://codereview.chromium.org/1709713002/diff/1/base/task_scheduler/priority_queue.h#newcode40 base/task_scheduler/priority_queue.h:40: // returned result ...
4 years, 10 months ago (2016-02-23 17:02:14 UTC) #7
gab
lgtm w/ comments Thanks! https://codereview.chromium.org/1709713002/diff/80001/base/task_scheduler/priority_queue.cc File base/task_scheduler/priority_queue.cc (right): https://codereview.chromium.org/1709713002/diff/80001/base/task_scheduler/priority_queue.cc#newcode49 base/task_scheduler/priority_queue.cc:49: // callback to avoid holding ...
4 years, 10 months ago (2016-02-23 20:58:42 UTC) #8
robliao
lgtm + comments, feel free to proceed to the next stage when you wish. https://codereview.chromium.org/1709713002/diff/80001/base/task_scheduler/priority_queue.cc ...
4 years, 10 months ago (2016-02-23 21:00:35 UTC) #9
fdoray
all done. I'll wait until I get a first round of comments from Nico on ...
4 years, 10 months ago (2016-02-24 15:03:53 UTC) #10
gab
lgtm++ https://codereview.chromium.org/1709713002/diff/80001/base/task_scheduler/priority_queue.cc File base/task_scheduler/priority_queue.cc (right): https://codereview.chromium.org/1709713002/diff/80001/base/task_scheduler/priority_queue.cc#newcode40 base/task_scheduler/priority_queue.cc:40: DCHECK(predecessor_priority_queue); On 2016/02/24 15:03:53, fdoray wrote: > On ...
4 years, 10 months ago (2016-02-24 18:07:38 UTC) #11
fdoray
https://codereview.chromium.org/1709713002/diff/80001/base/task_scheduler/priority_queue.cc File base/task_scheduler/priority_queue.cc (right): https://codereview.chromium.org/1709713002/diff/80001/base/task_scheduler/priority_queue.cc#newcode40 base/task_scheduler/priority_queue.cc:40: DCHECK(predecessor_priority_queue); On 2016/02/24 18:07:38, gab wrote: > On 2016/02/24 ...
4 years, 10 months ago (2016-02-24 18:18:42 UTC) #12
robliao
https://codereview.chromium.org/1709713002/diff/80001/base/task_scheduler/priority_queue.cc File base/task_scheduler/priority_queue.cc (right): https://codereview.chromium.org/1709713002/diff/80001/base/task_scheduler/priority_queue.cc#newcode40 base/task_scheduler/priority_queue.cc:40: DCHECK(predecessor_priority_queue); On 2016/02/24 18:18:42, fdoray wrote: > On 2016/02/24 ...
4 years, 10 months ago (2016-02-24 18:46:33 UTC) #13
robliao
https://codereview.chromium.org/1709713002/diff/80001/base/task_scheduler/priority_queue.cc File base/task_scheduler/priority_queue.cc (right): https://codereview.chromium.org/1709713002/diff/80001/base/task_scheduler/priority_queue.cc#newcode40 base/task_scheduler/priority_queue.cc:40: DCHECK(predecessor_priority_queue); On 2016/02/24 18:46:33, robliao wrote: > On 2016/02/24 ...
4 years, 10 months ago (2016-02-24 20:04:52 UTC) #14
fdoray
thakis@: Can you review this CL when you are done reviewing these: - TaskScheduler [2/8] ...
4 years, 10 months ago (2016-02-25 19:14:23 UTC) #16
gab
On 2016/02/25 19:14:23, fdoray wrote: > thakis@: Can you review this CL when you are ...
4 years, 9 months ago (2016-03-03 00:39:44 UTC) #18
fdoray
danakj@: Can you review this CL for the new task scheduler? Thanks!
4 years, 9 months ago (2016-03-17 15:43:16 UTC) #20
robliao
Some small nits on an update scan. https://codereview.chromium.org/1709713002/diff/160001/base/task_scheduler/priority_queue.h File base/task_scheduler/priority_queue.h (right): https://codereview.chromium.org/1709713002/diff/160001/base/task_scheduler/priority_queue.h#newcode59 base/task_scheduler/priority_queue.h:59: class BASE_EXPORT ...
4 years, 9 months ago (2016-03-17 17:48:10 UTC) #21
danakj
Can you give this a more detailed CL description to say what it's doing on ...
4 years, 9 months ago (2016-03-17 18:44:45 UTC) #22
fdoray
danakj@: I updated the CL's description. robliao@: I addressed your 2 comments. https://codereview.chromium.org/1709713002/diff/160001/base/task_scheduler/priority_queue.h File base/task_scheduler/priority_queue.h ...
4 years, 9 months ago (2016-03-17 19:12:02 UTC) #24
robliao
On 2016/03/17 19:12:02, fdoray wrote: > danakj@: I updated the CL's description. > robliao@: I ...
4 years, 9 months ago (2016-03-17 20:02:56 UTC) #25
danakj
https://codereview.chromium.org/1709713002/diff/160001/base/task_scheduler/priority_queue.cc File base/task_scheduler/priority_queue.cc (right): https://codereview.chromium.org/1709713002/diff/160001/base/task_scheduler/priority_queue.cc#newcode20 base/task_scheduler/priority_queue.cc:20: : sequence(sequence), sort_key(sort_key) {} move the sequence https://codereview.chromium.org/1709713002/diff/160001/base/task_scheduler/priority_queue.cc#newcode24 base/task_scheduler/priority_queue.cc:24: ...
4 years, 9 months ago (2016-03-17 21:32:15 UTC) #26
fdoray
danakj@: All done. Can you take another look and respond to my questions at https://codereview.chromium.org/1709713002/diff/160001/base/task_scheduler/priority_queue.cc#newcode64 ...
4 years, 9 months ago (2016-03-18 16:06:56 UTC) #27
robliao
https://codereview.chromium.org/1709713002/diff/160001/base/task_scheduler/priority_queue.cc File base/task_scheduler/priority_queue.cc (right): https://codereview.chromium.org/1709713002/diff/160001/base/task_scheduler/priority_queue.cc#newcode64 base/task_scheduler/priority_queue.cc:64: PriorityQueue::SequenceAndSortKey PriorityQueue::Transaction::Peek() const { On 2016/03/18 16:06:55, fdoray wrote: ...
4 years, 9 months ago (2016-03-18 17:11:55 UTC) #28
danakj
https://codereview.chromium.org/1709713002/diff/160001/base/task_scheduler/priority_queue.cc File base/task_scheduler/priority_queue.cc (right): https://codereview.chromium.org/1709713002/diff/160001/base/task_scheduler/priority_queue.cc#newcode64 base/task_scheduler/priority_queue.cc:64: PriorityQueue::SequenceAndSortKey PriorityQueue::Transaction::Peek() const { On 2016/03/18 16:06:55, fdoray wrote: ...
4 years, 9 months ago (2016-03-18 17:44:17 UTC) #29
fdoray
danakj@: Can you take another look at the CL? https://codereview.chromium.org/1709713002/diff/160001/base/task_scheduler/priority_queue.cc File base/task_scheduler/priority_queue.cc (right): https://codereview.chromium.org/1709713002/diff/160001/base/task_scheduler/priority_queue.cc#newcode64 base/task_scheduler/priority_queue.cc:64: ...
4 years, 9 months ago (2016-03-18 19:35:28 UTC) #30
danakj
LGTM https://codereview.chromium.org/1709713002/diff/160001/base/task_scheduler/priority_queue.h File base/task_scheduler/priority_queue.h (right): https://codereview.chromium.org/1709713002/diff/160001/base/task_scheduler/priority_queue.h#newcode81 base/task_scheduler/priority_queue.h:81: // Holds the lock of |outer_| for most ...
4 years, 9 months ago (2016-03-18 20:24:05 UTC) #31
fdoray
https://codereview.chromium.org/1709713002/diff/160001/base/task_scheduler/priority_queue.h File base/task_scheduler/priority_queue.h (right): https://codereview.chromium.org/1709713002/diff/160001/base/task_scheduler/priority_queue.h#newcode81 base/task_scheduler/priority_queue.h:81: // Holds the lock of |outer_| for most of ...
4 years, 9 months ago (2016-03-18 21:22:18 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1709713002/280001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1709713002/280001
4 years, 9 months ago (2016-03-18 21:22:55 UTC) #35
danakj
https://codereview.chromium.org/1709713002/diff/260001/base/task_scheduler/priority_queue.h File base/task_scheduler/priority_queue.h (right): https://codereview.chromium.org/1709713002/diff/260001/base/task_scheduler/priority_queue.h#newcode132 base/task_scheduler/priority_queue.h:132: const SequenceAndSortKey empty_sequence_and_sort_key_; On 2016/03/18 21:22:18, fdoray wrote: > ...
4 years, 9 months ago (2016-03-18 21:24:08 UTC) #36
commit-bot: I haz the power
Committed patchset #15 (id:280001)
4 years, 9 months ago (2016-03-18 22:45:07 UTC) #38
commit-bot: I haz the power
4 years, 9 months ago (2016-03-18 22:48:09 UTC) #40
Message was sent while issue was closed.
Patchset 15 (id:??) landed as
https://crrev.com/6477fbded94522e26875bbf405710060d01ea971
Cr-Commit-Position: refs/heads/master@{#382115}

Powered by Google App Engine
This is Rietveld 408576698