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

Issue 2042383004: Introduce TaskRunnerHandle. (Closed)

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

Description

Introduce TaskRunnerHandle. Deprecates ThreadTaskRunnerHandle and SequencedTaskRunnerHandle. Design doc: https://docs.google.com/document/d/1A_LRKyTOCzhRPOY4Q3RsePuw4UCsvxuFYx6D18BaYk0/edit CLs will follow to migrate SequencedTaskRunnerHandle callsites (with goal to have no callsite depending on a SequencedTaskRunner to be returned from unsequenced task): - https://codereview.chromium.org/2076153002/ - https://codereview.chromium.org/2076163002/ ThreadTaskRunnerHandle will not be auto migrated as callers of TaskRunnerHandle's getters should have made an explicit decision (i.e. TaskRunnerHandle::GetSingleThreaded() should indicate thread-affinity not merely a migration from ThreadTaskRunnerHandle::Get() which is often over-specific in today's usage). BUG=618043

Patch Set 1 #

Patch Set 2 : +tests #

Total comments: 8

Patch Set 3 : actually +tests #

Patch Set 4 : tweak comments #

Total comments: 12

Patch Set 5 : internal::TaskScopeState and union to only use one TLS slot #

Patch Set 6 : merge up to r399707 #

Patch Set 7 : fix compile #

Patch Set 8 : support for parallel tasks from SequencedWorkerPool #

Total comments: 22

Patch Set 9 : review:fdoray -- static_cast instead of union #

Patch Set 10 : update comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+461 lines, -123 lines) Patch
M base/BUILD.gn View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -0 lines 0 comments Download
M base/base.gyp View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -1 line 0 comments Download
M base/base.gypi View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -0 lines 0 comments Download
M base/threading/sequenced_task_runner_handle.h View 1 2 3 4 5 6 7 8 1 chunk +15 lines, -18 lines 0 comments Download
M base/threading/sequenced_task_runner_handle.cc View 1 2 3 4 5 1 chunk +2 lines, -53 lines 0 comments Download
A base/threading/task_runner_handle.h View 1 2 3 4 5 6 7 8 9 1 chunk +107 lines, -0 lines 0 comments Download
A base/threading/task_runner_handle.cc View 1 2 3 4 5 6 7 8 1 chunk +139 lines, -0 lines 0 comments Download
A base/threading/task_runner_handle_internal.h View 1 2 3 4 5 6 7 8 1 chunk +48 lines, -0 lines 0 comments Download
A base/threading/task_runner_handle_unittest.cc View 1 2 3 4 1 chunk +121 lines, -0 lines 0 comments Download
M base/threading/thread_task_runner_handle.h View 1 2 3 4 5 1 chunk +18 lines, -15 lines 0 comments Download
M base/threading/thread_task_runner_handle.cc View 1 2 3 4 5 1 chunk +2 lines, -36 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 18 (6 generated)
gab
Rob/Francois WDYT? Still need to write tests (and follow-up Cls), planning to send to Dana ...
4 years, 6 months ago (2016-06-07 19:13:18 UTC) #3
fdoray
interface lg https://codereview.chromium.org/2042383004/diff/20001/base/threading/task_runner_handle.cc File base/threading/task_runner_handle.cc (right): https://codereview.chromium.org/2042383004/diff/20001/base/threading/task_runner_handle.cc#newcode35 base/threading/task_runner_handle.cc:35: if (single_thread_task_scope_tls.Pointer()->Get()) { if (HasSingleThreadTaskScope()) return GetSingleThreaded() ...
4 years, 6 months ago (2016-06-08 18:10:44 UTC) #4
gab
Discussion below, thanks. https://codereview.chromium.org/2042383004/diff/20001/base/threading/task_runner_handle.cc File base/threading/task_runner_handle.cc (right): https://codereview.chromium.org/2042383004/diff/20001/base/threading/task_runner_handle.cc#newcode35 base/threading/task_runner_handle.cc:35: if (single_thread_task_scope_tls.Pointer()->Get()) { On 2016/06/08 18:10:44, ...
4 years, 6 months ago (2016-06-08 20:29:20 UTC) #5
robliao
https://codereview.chromium.org/2042383004/diff/60001/base/threading/sequenced_task_runner_handle.h File base/threading/sequenced_task_runner_handle.h (right): https://codereview.chromium.org/2042383004/diff/60001/base/threading/sequenced_task_runner_handle.h#newcode19 base/threading/sequenced_task_runner_handle.h:19: // Deprecated, use TaskRunnerHandle::GetSequenced() instead. Might be helpful to ...
4 years, 6 months ago (2016-06-09 15:40:18 UTC) #6
gab
Here's a redesigned version of the impl that uses a union to avoid using 3 ...
4 years, 6 months ago (2016-06-14 15:38:59 UTC) #8
fdoray
https://codereview.chromium.org/2042383004/diff/180001/base/BUILD.gn File base/BUILD.gn (right): https://codereview.chromium.org/2042383004/diff/180001/base/BUILD.gn#newcode825 base/BUILD.gn:825: "threading/task_runner_handle.cc", Why is this in base/threading/? Could it be ...
4 years, 6 months ago (2016-06-17 14:29:02 UTC) #10
gab
@fdoray: done (sorry for merge noise in this PS for GYP/GN -- other files should ...
4 years, 6 months ago (2016-06-20 19:55:36 UTC) #12
gab
Dana, WDYT of this (and associated design doc which you've already seen)? I'm thinking of ...
4 years, 6 months ago (2016-06-21 19:39:54 UTC) #13
gab
Dana, WDYT of this (and associated design doc which you've already seen)? I'm thinking of ...
4 years, 6 months ago (2016-06-21 19:41:46 UTC) #15
danakj
On 2016/06/21 19:41:46, gab (OOO back Monday) wrote: > Dana, WDYT of this (and associated ...
4 years, 6 months ago (2016-06-22 22:33:02 UTC) #16
gab
On 2016/06/22 22:33:02, danakj wrote: > On 2016/06/21 19:41:46, gab (OOO back Monday) wrote: > ...
4 years, 5 months ago (2016-07-13 21:19:25 UTC) #17
danakj
4 years, 5 months ago (2016-07-13 22:11:31 UTC) #18
Message was sent while issue was closed.
On Wed, Jul 13, 2016 at 2:19 PM, <gab@chromium.org> wrote:

> On 2016/06/22 22:33:02, danakj wrote:
> > On 2016/06/21 19:41:46, gab (OOO back Monday) wrote:
> > > Dana, WDYT of this (and associated design doc which you've already
> seen)?
> > >
> > > I'm thinking of getting second thoughts from eng-review on this before
> going
> > > live too once you are happy with it.
> > >
> > > Thanks!
> > > Gab
> >
> > I am worried I do not have the context around uses of
> SequencedTaskRunnerHandle
> > to understand all the implications, and rsleevi is intensely concerned
> about
> > this change on the doc. So I think we should resolve the plan some more.
> And
> > perhaps bring in some more people who are more familiar with uses of
> > SequencedTaskRunnerHandle to the discussion if you think that would be
> helpful.
>
> Closing this per conclusion of thread @
>
>
https://groups.google.com/a/chromium.org/d/topic/chromium-dev/cd9hldEhIEc/dis...
> (see last 2 replies as tl;dr;)
>

Thanks, I'm happy with the outcome of that thread. :)

-- 
You received this message because you are subscribed to the Google Groups
"Chromium-reviews" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to chromium-reviews+unsubscribe@chromium.org.

Powered by Google App Engine
This is Rietveld 408576698