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

Issue 2546773002: TaskScheduler: Add internal::GetTaskPriorityForCurrentThread(). (Closed)

Created:
4 years ago by fdoray
Modified:
4 years ago
Reviewers:
robliao, danakj, gab
CC:
chromium-reviews, gab+watch_chromium.org, robliao+watch_chromium.org, fdoray+watch_chromium.org, vmpstr+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

TaskScheduler: Add internal::GetTaskPriorityForCurrentThread(). This function returns the TaskPriority of the currently running task. It will used to initialize TaskTraits with the priority of the currently running task. BUG=553459 TBR=danakj@chromium.org Committed: https://crrev.com/0458ffb3117d62ea4922b578effb625ed118d647 Cr-Commit-Position: refs/heads/master@{#435728}

Patch Set 1 #

Patch Set 2 : self-review #

Patch Set 3 : self-review #

Total comments: 4

Patch Set 4 : traits -> priority #

Patch Set 5 : traits -> priority #

Total comments: 7

Patch Set 6 : rename to scoped_set_task_priority_for_current_thread.h/cc #

Unified diffs Side-by-side diffs Delta from patch set Stats (+109 lines, -1 line) Patch
M base/BUILD.gn View 1 2 3 4 5 2 chunks +3 lines, -0 lines 0 comments Download
A base/task_scheduler/scoped_set_task_priority_for_current_thread.h View 1 2 3 4 5 1 chunk +36 lines, -0 lines 0 comments Download
A base/task_scheduler/scoped_set_task_priority_for_current_thread.cc View 1 2 3 4 5 1 chunk +41 lines, -0 lines 0 comments Download
A base/task_scheduler/scoped_set_task_priority_for_current_thread_unittest.cc View 1 2 3 4 5 1 chunk +26 lines, -0 lines 0 comments Download
M base/task_scheduler/task_tracker.cc View 1 2 3 4 5 2 chunks +3 lines, -1 line 0 comments Download

Dependent Patchsets:

Messages

Total messages: 22 (8 generated)
fdoray
PTAL
4 years ago (2016-12-01 17:14:54 UTC) #2
gab
Meta-comment: I'm not convinced we want every trait to be inherited. In fact I think ...
4 years ago (2016-12-01 18:04:39 UTC) #3
robliao
https://codereview.chromium.org/2546773002/diff/40001/base/task_scheduler/task_traits_for_current_thread.cc File base/task_scheduler/task_traits_for_current_thread.cc (right): https://codereview.chromium.org/2546773002/diff/40001/base/task_scheduler/task_traits_for_current_thread.cc#newcode21 base/task_scheduler/task_traits_for_current_thread.cc:21: const TaskTraits* traits) Crazy thought. Can this simply be ...
4 years ago (2016-12-01 18:12:01 UTC) #4
fdoray
On 2016/12/01 18:04:39, gab wrote: > Meta-comment: > > I'm not convinced we want every ...
4 years ago (2016-12-01 18:51:53 UTC) #5
fdoray
PTAnL On 2016/12/01 18:04:39, gab wrote: > Meta-comment: > > I'm not convinced we want ...
4 years ago (2016-12-01 19:16:02 UTC) #7
robliao
https://codereview.chromium.org/2546773002/diff/80001/base/task_scheduler/task_priority_for_current_thread.cc File base/task_scheduler/task_priority_for_current_thread.cc (right): https://codereview.chromium.org/2546773002/diff/80001/base/task_scheduler/task_priority_for_current_thread.cc#newcode16 base/task_scheduler/task_priority_for_current_thread.cc:16: LazyInstance<ThreadLocalPointer<const TaskPriority>>::Leaky Would ThreadLocalStorage::StaticSlot tls... = TLS_INITIALIZER work better ...
4 years ago (2016-12-01 19:27:27 UTC) #8
fdoray
https://codereview.chromium.org/2546773002/diff/80001/base/task_scheduler/task_priority_for_current_thread.cc File base/task_scheduler/task_priority_for_current_thread.cc (right): https://codereview.chromium.org/2546773002/diff/80001/base/task_scheduler/task_priority_for_current_thread.cc#newcode16 base/task_scheduler/task_priority_for_current_thread.cc:16: LazyInstance<ThreadLocalPointer<const TaskPriority>>::Leaky On 2016/12/01 19:27:27, robliao wrote: > Would ...
4 years ago (2016-12-01 19:41:07 UTC) #9
robliao
https://codereview.chromium.org/2546773002/diff/80001/base/task_scheduler/task_priority_for_current_thread.cc File base/task_scheduler/task_priority_for_current_thread.cc (right): https://codereview.chromium.org/2546773002/diff/80001/base/task_scheduler/task_priority_for_current_thread.cc#newcode16 base/task_scheduler/task_priority_for_current_thread.cc:16: LazyInstance<ThreadLocalPointer<const TaskPriority>>::Leaky On 2016/12/01 19:41:07, fdoray wrote: > On ...
4 years ago (2016-12-01 20:08:57 UTC) #10
fdoray
PTAnL https://codereview.chromium.org/2546773002/diff/80001/base/task_scheduler/task_priority_for_current_thread.h File base/task_scheduler/task_priority_for_current_thread.h (right): https://codereview.chromium.org/2546773002/diff/80001/base/task_scheduler/task_priority_for_current_thread.h#newcode15 base/task_scheduler/task_priority_for_current_thread.h:15: class BASE_EXPORT ScopedSetTaskPriorityForCurrentThread { On 2016/12/01 20:08:57, robliao ...
4 years ago (2016-12-01 20:23:37 UTC) #11
robliao
lgtm
4 years ago (2016-12-01 20:25:24 UTC) #12
fdoray
TBR danakj@chromium.org for base/BUILD.gn
4 years ago (2016-12-01 20:27:17 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2546773002/100001
4 years ago (2016-12-01 20:27:55 UTC) #17
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years ago (2016-12-01 21:50:15 UTC) #20
commit-bot: I haz the power
4 years ago (2016-12-01 21:52:53 UTC) #22
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/0458ffb3117d62ea4922b578effb625ed118d647
Cr-Commit-Position: refs/heads/master@{#435728}

Powered by Google App Engine
This is Rietveld 408576698