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 1414793009: Allow SequencedTaskRunnerHandle::Get() while running unsequenced tasks. (Closed)

Created:
5 years, 1 month ago by Bernhard Bauer
Modified:
4 years, 6 months ago
Reviewers:
danakj, gab
CC:
chromium-reviews, vmpstr+watch_chromium.org, Ryan Sleevi
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Allow SequencedTaskRunnerHandle::Get() while running unsequenced tasks. If the SequencedWorkerPool is running an unsequenced task, it will assign a new sequence token to it and use that for the returned SequencedTaskRunner. Committed: https://crrev.com/5d315e4b4a7cdef34b0c1e863353d03a30781217 Cr-Commit-Position: refs/heads/master@{#368078}

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : x #

Total comments: 11

Patch Set 4 : tests & comments #

Patch Set 5 : fix #

Patch Set 6 : fix #

Total comments: 14

Patch Set 7 : review #

Total comments: 4

Patch Set 8 : review #

Total comments: 2

Patch Set 9 : remove base:: #

Total comments: 34

Patch Set 10 : review #

Total comments: 4

Patch Set 11 : review #

Patch Set 12 : added comment #

Total comments: 3

Patch Set 13 : review #

Patch Set 14 : moar test #

Total comments: 2

Patch Set 15 : ASSERT -> EXPECT #

Patch Set 16 : sync #

Unified diffs Side-by-side diffs Delta from patch set Stats (+250 lines, -67 lines) Patch
M base/threading/sequenced_task_runner_handle.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +2 lines, -2 lines 0 comments Download
M base/threading/sequenced_task_runner_handle.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +7 lines, -14 lines 0 comments Download
M base/threading/sequenced_task_runner_handle_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +29 lines, -11 lines 0 comments Download
M base/threading/sequenced_worker_pool.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +19 lines, -5 lines 0 comments Download
M base/threading/sequenced_worker_pool.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 9 chunks +69 lines, -4 lines 0 comments Download
M base/threading/sequenced_worker_pool_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +124 lines, -31 lines 0 comments Download

Messages

Total messages: 58 (17 generated)
danakj
https://codereview.chromium.org/1414793009/diff/40001/base/threading/sequenced_task_runner_handle.cc File base/threading/sequenced_task_runner_handle.cc (right): https://codereview.chromium.org/1414793009/diff/40001/base/threading/sequenced_task_runner_handle.cc#newcode20 base/threading/sequenced_task_runner_handle.cc:20: return base::ThreadTaskRunnerHandle::Get(); I'm wondering if this is a good ...
5 years, 1 month ago (2015-11-05 18:52:08 UTC) #3
gab
The overall approach LG, let us know when comments/tests have been updated. Thanks! Gab https://codereview.chromium.org/1414793009/diff/40001/base/threading/sequenced_task_runner_handle.cc ...
5 years, 1 month ago (2015-11-05 23:29:18 UTC) #5
danakj
https://codereview.chromium.org/1414793009/diff/40001/base/threading/sequenced_task_runner_handle.cc File base/threading/sequenced_task_runner_handle.cc (right): https://codereview.chromium.org/1414793009/diff/40001/base/threading/sequenced_task_runner_handle.cc#newcode20 base/threading/sequenced_task_runner_handle.cc:20: return base::ThreadTaskRunnerHandle::Get(); On 2015/11/05 23:29:18, gab wrote: > On ...
5 years, 1 month ago (2015-11-05 23:31:16 UTC) #6
gab
https://codereview.chromium.org/1414793009/diff/40001/base/threading/sequenced_task_runner_handle.cc File base/threading/sequenced_task_runner_handle.cc (right): https://codereview.chromium.org/1414793009/diff/40001/base/threading/sequenced_task_runner_handle.cc#newcode20 base/threading/sequenced_task_runner_handle.cc:20: return base::ThreadTaskRunnerHandle::Get(); On 2015/11/05 23:31:15, danakj wrote: > On ...
5 years, 1 month ago (2015-11-05 23:33:10 UTC) #7
Bernhard Bauer
Tests and comments added. PTAL, thanks! https://codereview.chromium.org/1414793009/diff/40001/base/threading/sequenced_task_runner_handle.cc File base/threading/sequenced_task_runner_handle.cc (right): https://codereview.chromium.org/1414793009/diff/40001/base/threading/sequenced_task_runner_handle.cc#newcode17 base/threading/sequenced_task_runner_handle.cc:17: return task_runner; On ...
5 years, 1 month ago (2015-11-10 17:12:06 UTC) #9
gab
https://codereview.chromium.org/1414793009/diff/40001/base/threading/sequenced_task_runner_handle.cc File base/threading/sequenced_task_runner_handle.cc (right): https://codereview.chromium.org/1414793009/diff/40001/base/threading/sequenced_task_runner_handle.cc#newcode17 base/threading/sequenced_task_runner_handle.cc:17: return task_runner; On 2015/11/10 17:12:06, Bernhard Bauer wrote: > ...
5 years, 1 month ago (2015-11-10 19:54:19 UTC) #10
Bernhard Bauer
https://codereview.chromium.org/1414793009/diff/40001/base/threading/sequenced_task_runner_handle.cc File base/threading/sequenced_task_runner_handle.cc (right): https://codereview.chromium.org/1414793009/diff/40001/base/threading/sequenced_task_runner_handle.cc#newcode17 base/threading/sequenced_task_runner_handle.cc:17: return task_runner; On 2015/11/10 19:54:18, gab wrote: > On ...
5 years, 1 month ago (2015-11-10 20:31:48 UTC) #11
gab
lgtm w/ 2 requests, thanks! https://codereview.chromium.org/1414793009/diff/120001/base/threading/sequenced_worker_pool_unittest.cc File base/threading/sequenced_worker_pool_unittest.cc (right): https://codereview.chromium.org/1414793009/diff/120001/base/threading/sequenced_worker_pool_unittest.cc#newcode949 base/threading/sequenced_worker_pool_unittest.cc:949: FROM_HERE, base::Bind(&VerifyCurrentSequencedTaskRunner, task_runner_2)); Would ...
5 years, 1 month ago (2015-11-12 01:33:56 UTC) #12
Bernhard Bauer
Thanks for the review! https://codereview.chromium.org/1414793009/diff/120001/base/threading/sequenced_worker_pool_unittest.cc File base/threading/sequenced_worker_pool_unittest.cc (right): https://codereview.chromium.org/1414793009/diff/120001/base/threading/sequenced_worker_pool_unittest.cc#newcode949 base/threading/sequenced_worker_pool_unittest.cc:949: FROM_HERE, base::Bind(&VerifyCurrentSequencedTaskRunner, task_runner_2)); On 2015/11/12 ...
5 years, 1 month ago (2015-11-12 02:23:40 UTC) #13
gab
Thanks, lgtm++ https://codereview.chromium.org/1414793009/diff/140001/base/threading/sequenced_worker_pool_unittest.cc File base/threading/sequenced_worker_pool_unittest.cc (right): https://codereview.chromium.org/1414793009/diff/140001/base/threading/sequenced_worker_pool_unittest.cc#newcode950 base/threading/sequenced_worker_pool_unittest.cc:950: Closure signal = base::Bind(&WaitableEvent::Signal, base::Unretained(&event)); Either use ...
5 years, 1 month ago (2015-11-12 14:23:25 UTC) #14
Bernhard Bauer
Dana, could you TAL, P? https://codereview.chromium.org/1414793009/diff/140001/base/threading/sequenced_worker_pool_unittest.cc File base/threading/sequenced_worker_pool_unittest.cc (right): https://codereview.chromium.org/1414793009/diff/140001/base/threading/sequenced_worker_pool_unittest.cc#newcode950 base/threading/sequenced_worker_pool_unittest.cc:950: Closure signal = base::Bind(&WaitableEvent::Signal, ...
5 years, 1 month ago (2015-11-12 19:23:50 UTC) #15
danakj
> If the SequencedWorkerPool is running an unsequenced task, it will assign a new sequence ...
5 years, 1 month ago (2015-11-17 21:30:39 UTC) #16
Bernhard Bauer
On 2015/11/17 21:30:39, danakj (behind on reviews) wrote: > > If the SequencedWorkerPool is running ...
5 years, 1 month ago (2015-11-17 21:55:17 UTC) #18
danakj
I haz questions! https://codereview.chromium.org/1414793009/diff/160001/base/threading/sequenced_task_runner_handle.cc File base/threading/sequenced_task_runner_handle.cc (right): https://codereview.chromium.org/1414793009/diff/160001/base/threading/sequenced_task_runner_handle.cc#newcode19 base/threading/sequenced_task_runner_handle.cc:19: return task_runner ? task_runner : scoped_refptr<SequencedTaskRunner>( ...
5 years, 1 month ago (2015-11-17 22:03:39 UTC) #19
Bernhard Bauer
https://codereview.chromium.org/1414793009/diff/160001/base/threading/sequenced_task_runner_handle.cc File base/threading/sequenced_task_runner_handle.cc (right): https://codereview.chromium.org/1414793009/diff/160001/base/threading/sequenced_task_runner_handle.cc#newcode19 base/threading/sequenced_task_runner_handle.cc:19: return task_runner ? task_runner : scoped_refptr<SequencedTaskRunner>( On 2015/11/17 22:03:39, ...
5 years, 1 month ago (2015-11-18 13:15:50 UTC) #20
danakj
https://codereview.chromium.org/1414793009/diff/160001/base/threading/sequenced_worker_pool_unittest.cc File base/threading/sequenced_worker_pool_unittest.cc (right): https://codereview.chromium.org/1414793009/diff/160001/base/threading/sequenced_worker_pool_unittest.cc#newcode956 base/threading/sequenced_worker_pool_unittest.cc:956: task_runner_1, true, signal)); On 2015/11/18 13:15:50, Bernhard Bauer wrote: ...
5 years, 1 month ago (2015-11-18 19:06:32 UTC) #21
gab
https://codereview.chromium.org/1414793009/diff/160001/base/threading/sequenced_task_runner_handle.cc File base/threading/sequenced_task_runner_handle.cc (right): https://codereview.chromium.org/1414793009/diff/160001/base/threading/sequenced_task_runner_handle.cc#newcode19 base/threading/sequenced_task_runner_handle.cc:19: return task_runner ? task_runner : scoped_refptr<SequencedTaskRunner>( On 2015/11/18 13:15:50, ...
5 years, 1 month ago (2015-11-18 22:37:33 UTC) #22
Bernhard Bauer
https://codereview.chromium.org/1414793009/diff/160001/base/threading/sequenced_worker_pool_unittest.cc File base/threading/sequenced_worker_pool_unittest.cc (right): https://codereview.chromium.org/1414793009/diff/160001/base/threading/sequenced_worker_pool_unittest.cc#newcode956 base/threading/sequenced_worker_pool_unittest.cc:956: task_runner_1, true, signal)); On 2015/11/18 22:37:33, gab wrote: > ...
5 years, 1 month ago (2015-11-19 10:15:12 UTC) #23
gab
lgtm3 :-) https://codereview.chromium.org/1414793009/diff/180001/base/threading/sequenced_worker_pool.cc File base/threading/sequenced_worker_pool.cc (right): https://codereview.chromium.org/1414793009/diff/180001/base/threading/sequenced_worker_pool.cc#newcode831 base/threading/sequenced_worker_pool.cc:831: task.sequence_token_id = this_worker->task_sequence_token().id_; On 2015/11/19 10:15:12, Bernhard ...
5 years, 1 month ago (2015-11-19 14:34:37 UTC) #24
gab
On 2015/11/19 14:34:37, gab wrote: > lgtm3 :-) Oops that doesn't parse... LGTM w/ comment ...
5 years, 1 month ago (2015-11-19 14:35:04 UTC) #25
Bernhard Bauer
https://codereview.chromium.org/1414793009/diff/180001/base/threading/sequenced_worker_pool.cc File base/threading/sequenced_worker_pool.cc (right): https://codereview.chromium.org/1414793009/diff/180001/base/threading/sequenced_worker_pool.cc#newcode831 base/threading/sequenced_worker_pool.cc:831: task.sequence_token_id = this_worker->task_sequence_token().id_; On 2015/11/19 14:34:36, gab wrote: > ...
5 years, 1 month ago (2015-11-19 17:01:56 UTC) #26
danakj
https://codereview.chromium.org/1414793009/diff/160001/base/threading/sequenced_worker_pool_unittest.cc File base/threading/sequenced_worker_pool_unittest.cc (right): https://codereview.chromium.org/1414793009/diff/160001/base/threading/sequenced_worker_pool_unittest.cc#newcode956 base/threading/sequenced_worker_pool_unittest.cc:956: task_runner_1, true, signal)); On 2015/11/19 10:15:12, Bernhard Bauer wrote: ...
5 years, 1 month ago (2015-11-19 18:49:08 UTC) #27
Bernhard Bauer
On 2015/11/19 18:49:08, danakj (behind on reviews) wrote: > Yes please, it's not the overhead ...
5 years, 1 month ago (2015-11-19 19:42:00 UTC) #28
Bernhard Bauer
On 2015/11/19 19:42:00, Bernhard Bauer wrote: > On 2015/11/19 18:49:08, danakj (behind on reviews) wrote: ...
5 years, 1 month ago (2015-11-20 13:16:07 UTC) #29
danakj
Thanks! I have a few comment/test requests. https://codereview.chromium.org/1414793009/diff/160001/base/threading/sequenced_worker_pool.cc File base/threading/sequenced_worker_pool.cc (right): https://codereview.chromium.org/1414793009/diff/160001/base/threading/sequenced_worker_pool.cc#newcode829 base/threading/sequenced_worker_pool.cc:829: // still ...
5 years, 1 month ago (2015-11-20 19:18:43 UTC) #30
Bernhard Bauer
Sorry for the delay. PTAL, and let me know if I've missed anything, thanks! https://codereview.chromium.org/1414793009/diff/160001/base/threading/sequenced_worker_pool.cc ...
5 years ago (2015-12-10 16:09:59 UTC) #33
Bernhard Bauer
Friendly ping?
5 years ago (2015-12-14 18:10:25 UTC) #34
danakj
LGTM thanks for all the changes, one last thought about testing https://codereview.chromium.org/1414793009/diff/160001/base/threading/sequenced_worker_pool.cc File base/threading/sequenced_worker_pool.cc (right): ...
5 years ago (2015-12-16 21:53:32 UTC) #35
Bernhard Bauer
On 2015/12/16 21:53:32, danakj (behind on reviews) wrote: > LGTM thanks for all the changes, ...
5 years ago (2015-12-17 17:44:49 UTC) #36
danakj
LGTM https://codereview.chromium.org/1414793009/diff/300001/base/threading/sequenced_worker_pool_unittest.cc File base/threading/sequenced_worker_pool_unittest.cc (right): https://codereview.chromium.org/1414793009/diff/300001/base/threading/sequenced_worker_pool_unittest.cc#newcode943 base/threading/sequenced_worker_pool_unittest.cc:943: ASSERT_TRUE(sequence_token.IsValid()); nit: i generally prefer to always EXPECT ...
5 years ago (2015-12-17 23:49:51 UTC) #37
Bernhard Bauer
https://codereview.chromium.org/1414793009/diff/300001/base/threading/sequenced_worker_pool_unittest.cc File base/threading/sequenced_worker_pool_unittest.cc (right): https://codereview.chromium.org/1414793009/diff/300001/base/threading/sequenced_worker_pool_unittest.cc#newcode943 base/threading/sequenced_worker_pool_unittest.cc:943: ASSERT_TRUE(sequence_token.IsValid()); On 2015/12/17 23:49:51, danakj (behind on reviews) wrote: ...
5 years ago (2015-12-18 19:00:01 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1414793009/320001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1414793009/320001
5 years ago (2015-12-18 19:00:55 UTC) #41
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_gn_chromeos_rel on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_gn_chromeos_rel/builds/122566)
5 years ago (2015-12-18 19:36:56 UTC) #43
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1414793009/320001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1414793009/320001
4 years, 11 months ago (2016-01-06 17:34:22 UTC) #45
commit-bot: I haz the power
Try jobs failed on following builders: chromeos_x86-generic_chromium_compile_only_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_x86-generic_chromium_compile_only_ng/builds/75991)
4 years, 11 months ago (2016-01-06 18:08:17 UTC) #47
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1414793009/340001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1414793009/340001
4 years, 11 months ago (2016-01-07 15:26:56 UTC) #50
commit-bot: I haz the power
Committed patchset #16 (id:340001)
4 years, 11 months ago (2016-01-07 15:34:16 UTC) #52
commit-bot: I haz the power
Patchset 16 (id:??) landed as https://crrev.com/5d315e4b4a7cdef34b0c1e863353d03a30781217 Cr-Commit-Position: refs/heads/master@{#368078}
4 years, 11 months ago (2016-01-07 15:35:08 UTC) #54
Mostyn Bramley-Moore
This change causes GCC builds to fail, there are a few errors that look like ...
4 years, 11 months ago (2016-01-07 18:51:39 UTC) #56
Mostyn Bramley-Moore
Followup: https://codereview.chromium.org/1567983003/
4 years, 11 months ago (2016-01-07 19:12:31 UTC) #57
gab
4 years, 6 months ago (2016-06-07 19:27:18 UTC) #58
Message was sent while issue was closed.
FYI, I changed my mind about this and have a plan to change it :
http://crbug.com/618043 if you still care :-).

Powered by Google App Engine
This is Rietveld 408576698