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

Issue 1906083002: TaskScheduler: Remove base/task_scheduler/utils.h/.cc (Closed)

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

Description

TaskScheduler: Remove base/task_scheduler/utils.h/.cc - Rename SchedulerThreadPool -> SchedulerThreadPoolImpl. - Rename SchedulerTaskExecutor -> SchedulerThreadPool. * For now, this interface is implemented by SchedulerThreadPoolImpl. In the future, it could be implemented by a thread pool backed by the Windows thread pool. - Move the declaration of methods that would make sense for any thread pool implementation to SchedulerThreadPool. - Remove utils.h/.cc. Move the code of helper functions defined in these files directly in scheduler_thread_pool_impl.cc. * scheduler_worker_thread.cc won't use these functions as initially planned, which means that there is no need to make them accessible outside of scheduler_thread_pool_impl.cc BUG=553459 Committed: https://crrev.com/583b226e92c4d416c149628baa7b8ea76e7aed48 Cr-Commit-Position: refs/heads/master@{#389567}

Patch Set 1 #

Total comments: 6

Patch Set 2 : rebase #

Patch Set 3 : CR robliao #10 (rename SchedulerThreadPoolInterface) #

Patch Set 4 : CR gab #7 (more tests) #

Patch Set 5 : rebase #

Total comments: 10

Patch Set 6 : CR gab #16 #

Total comments: 2

Patch Set 7 : rebase #

Patch Set 8 : typos #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+317 lines, -1192 lines) Patch
M base/BUILD.gn View 1 2 3 4 5 6 4 chunks +3 lines, -6 lines 0 comments Download
M base/base.gyp View 1 2 3 4 5 6 2 chunks +1 line, -2 lines 0 comments Download
M base/base.gypi View 1 2 2 chunks +2 lines, -4 lines 0 comments Download
M base/task_scheduler/delayed_task_manager.h View 1 2 3 3 chunks +8 lines, -8 lines 0 comments Download
M base/task_scheduler/delayed_task_manager.cc View 1 2 6 chunks +10 lines, -10 lines 0 comments Download
M base/task_scheduler/delayed_task_manager_unittest.cc View 1 2 3 4 5 11 chunks +50 lines, -24 lines 0 comments Download
D base/task_scheduler/scheduler_task_executor.h View 1 chunk +0 lines, -33 lines 0 comments Download
M base/task_scheduler/scheduler_thread_pool.h View 1 2 3 4 5 1 chunk +18 lines, -98 lines 2 comments Download
M base/task_scheduler/scheduler_thread_pool.cc View 1 2 1 chunk +0 lines, -339 lines 0 comments Download
A + base/task_scheduler/scheduler_thread_pool_impl.h View 1 2 3 4 5 5 chunks +24 lines, -29 lines 0 comments Download
A + base/task_scheduler/scheduler_thread_pool_impl.cc View 1 2 3 4 5 12 chunks +105 lines, -86 lines 0 comments Download
A + base/task_scheduler/scheduler_thread_pool_impl_unittest.cc View 1 2 3 4 5 6 11 chunks +83 lines, -23 lines 0 comments Download
D base/task_scheduler/scheduler_thread_pool_unittest.cc View 1 2 3 4 5 6 1 chunk +0 lines, -259 lines 0 comments Download
M base/task_scheduler/scheduler_worker_thread.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M base/task_scheduler/scheduler_worker_thread.cc View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M base/task_scheduler/scheduler_worker_thread_stack_unittest.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M base/task_scheduler/scheduler_worker_thread_unittest.cc View 1 2 3 4 5 6 7 4 chunks +9 lines, -9 lines 0 comments Download
D base/task_scheduler/utils.h View 1 chunk +0 lines, -43 lines 0 comments Download
D base/task_scheduler/utils.cc View 1 chunk +0 lines, -74 lines 0 comments Download
D base/task_scheduler/utils_unittest.cc View 1 chunk +0 lines, -141 lines 0 comments Download

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 29 (7 generated)
fdoray
Can you review this CL? Thanks.
4 years, 8 months ago (2016-04-21 19:33:57 UTC) #2
robliao
What would this look like for child task runners (currently they choose the priority queue). ...
4 years, 8 months ago (2016-04-21 19:38:59 UTC) #3
fdoray
On 2016/04/21 19:38:59, robliao wrote: > What would this look like for child task runners ...
4 years, 8 months ago (2016-04-21 19:56:57 UTC) #4
robliao
On 2016/04/21 19:56:57, fdoray wrote: > On 2016/04/21 19:38:59, robliao wrote: > > What would ...
4 years, 8 months ago (2016-04-21 20:06:36 UTC) #5
fdoray
On 2016/04/21 20:06:36, robliao wrote: > On 2016/04/21 19:56:57, fdoray wrote: > > On 2016/04/21 ...
4 years, 8 months ago (2016-04-21 20:32:36 UTC) #6
gab
lgtm % comments https://codereview.chromium.org/1906083002/diff/1/base/task_scheduler/scheduler_thread_pool_interface.h File base/task_scheduler/scheduler_thread_pool_interface.h (right): https://codereview.chromium.org/1906083002/diff/1/base/task_scheduler/scheduler_thread_pool_interface.h#newcode18 base/task_scheduler/scheduler_thread_pool_interface.h:18: // Interface for a thread pool. ...
4 years, 8 months ago (2016-04-22 18:53:56 UTC) #7
danakj
LGTM!
4 years, 8 months ago (2016-04-22 20:09:56 UTC) #9
robliao
https://codereview.chromium.org/1906083002/diff/1/base/task_scheduler/scheduler_thread_pool_interface.h File base/task_scheduler/scheduler_thread_pool_interface.h (right): https://codereview.chromium.org/1906083002/diff/1/base/task_scheduler/scheduler_thread_pool_interface.h#newcode19 base/task_scheduler/scheduler_thread_pool_interface.h:19: class BASE_EXPORT SchedulerThreadPoolInterface { It's not common to have ...
4 years, 8 months ago (2016-04-22 20:22:25 UTC) #10
fdoray
robliao@: Can you take another look? Thanks. https://codereview.chromium.org/1906083002/diff/1/base/task_scheduler/scheduler_thread_pool_interface.h File base/task_scheduler/scheduler_thread_pool_interface.h (right): https://codereview.chromium.org/1906083002/diff/1/base/task_scheduler/scheduler_thread_pool_interface.h#newcode18 base/task_scheduler/scheduler_thread_pool_interface.h:18: // Interface ...
4 years, 8 months ago (2016-04-22 22:18:14 UTC) #11
danakj
That's all cool with me
4 years, 8 months ago (2016-04-22 22:21:28 UTC) #12
robliao
Looks mostly good. Update the CL description to reflect the changes in the CL as ...
4 years, 8 months ago (2016-04-22 22:56:42 UTC) #13
fdoray
robliao@: Can you take another look? https://codereview.chromium.org/1906083002/diff/80001/base/task_scheduler/delayed_task_manager.h File base/task_scheduler/delayed_task_manager.h (right): https://codereview.chromium.org/1906083002/diff/80001/base/task_scheduler/delayed_task_manager.h#newcode58 base/task_scheduler/delayed_task_manager.h:58: virtual TimeTicks Now() ...
4 years, 8 months ago (2016-04-25 15:19:12 UTC) #15
gab
New direction lgtm overall % comments. Will leave it up to Rob for final detailed ...
4 years, 8 months ago (2016-04-25 17:52:43 UTC) #16
fdoray
robliao@: Can you take another look? Thanks. https://codereview.chromium.org/1906083002/diff/80001/base/task_scheduler/scheduler_thread_pool.h File base/task_scheduler/scheduler_thread_pool.h (right): https://codereview.chromium.org/1906083002/diff/80001/base/task_scheduler/scheduler_thread_pool.h#newcode37 base/task_scheduler/scheduler_thread_pool.h:37: virtual void ...
4 years, 8 months ago (2016-04-25 19:14:51 UTC) #17
gab
https://codereview.chromium.org/1906083002/diff/100001/base/task_scheduler/scheduler_worker_thread_unittest.cc File base/task_scheduler/scheduler_worker_thread_unittest.cc (right): https://codereview.chromium.org/1906083002/diff/100001/base/task_scheduler/scheduler_worker_thread_unittest.cc#newcode136 base/task_scheduler/scheduler_worker_thread_unittest.cc:136: // Tasks and adds it to |re_re_enqueued_sequences_|. Unlike a ...
4 years, 8 months ago (2016-04-25 19:28:07 UTC) #18
fdoray
robliao@: Can you take another look? Thanks. https://codereview.chromium.org/1906083002/diff/100001/base/task_scheduler/scheduler_worker_thread_unittest.cc File base/task_scheduler/scheduler_worker_thread_unittest.cc (right): https://codereview.chromium.org/1906083002/diff/100001/base/task_scheduler/scheduler_worker_thread_unittest.cc#newcode136 base/task_scheduler/scheduler_worker_thread_unittest.cc:136: // Tasks ...
4 years, 8 months ago (2016-04-25 19:35:09 UTC) #19
robliao
lgtm https://codereview.chromium.org/1906083002/diff/80001/base/task_scheduler/delayed_task_manager.h File base/task_scheduler/delayed_task_manager.h (right): https://codereview.chromium.org/1906083002/diff/80001/base/task_scheduler/delayed_task_manager.h#newcode58 base/task_scheduler/delayed_task_manager.h:58: virtual TimeTicks Now() const; On 2016/04/25 15:19:12, fdoray ...
4 years, 8 months ago (2016-04-25 20:08:10 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1906083002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1906083002/140001
4 years, 8 months ago (2016-04-25 20:09:44 UTC) #23
commit-bot: I haz the power
Committed patchset #8 (id:140001)
4 years, 8 months ago (2016-04-25 21:34:43 UTC) #25
commit-bot: I haz the power
Patchset 8 (id:??) landed as https://crrev.com/583b226e92c4d416c149628baa7b8ea76e7aed48 Cr-Commit-Position: refs/heads/master@{#389567}
4 years, 8 months ago (2016-04-25 21:36:45 UTC) #27
gab
https://codereview.chromium.org/1906083002/diff/140001/base/task_scheduler/scheduler_thread_pool.h File base/task_scheduler/scheduler_thread_pool.h (right): https://codereview.chromium.org/1906083002/diff/140001/base/task_scheduler/scheduler_thread_pool.h#newcode46 base/task_scheduler/scheduler_thread_pool.h:46: // scheduler's TaskTracker must have allowed |task| to be ...
4 years, 8 months ago (2016-04-26 21:50:05 UTC) #28
gab
4 years, 8 months ago (2016-04-26 22:00:56 UTC) #29
Message was sent while issue was closed.
https://codereview.chromium.org/1906083002/diff/140001/base/task_scheduler/sc...
File base/task_scheduler/scheduler_thread_pool.h (right):

https://codereview.chromium.org/1906083002/diff/140001/base/task_scheduler/sc...
base/task_scheduler/scheduler_thread_pool.h:36: // worker thread doesn't have to
belong to this thread pool.
Actually this comment is also a bit outdated. Probably worth revisiting these
comments to make sure they match the new generic interface and situation.

Powered by Google App Engine
This is Rietveld 408576698