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

Issue 9169037: Make new TaskRunner, SequencedTaskRunner, and SingleThreadTaskRunner interfaces (Closed)

Created:
8 years, 11 months ago by akalin
Modified:
8 years, 10 months ago
CC:
chromium-reviews, sadrul, awong
Visibility:
Public.

Description

Make new TaskRunner, SequencedTaskRunner, and SingleThreadTaskRunner interfaces TaskRunner just has Post{,Delayed}Task(), SequencedTaskRunner extends Executor to have ordering guarantees and PostNonNestable{,Delayed}Task(), and SingleThreadTaskRunner extends SequencedTaskRunner and guarantees execution on a single thread. Move a bunch of methods from MessageLoopProxy into the TaskRunner classes and make it inherit from SingleThreadTaskRunner. BUG=110973 TEST= Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=121999

Patch Set 1 #

Total comments: 3

Patch Set 2 : Addressed comments, added more comments #

Patch Set 3 : Add SingleThreadExecutor #

Total comments: 8

Patch Set 4 : Address comments #

Patch Set 5 : Fix Win build #

Total comments: 7

Patch Set 6 : Addressed comments, renamed back to TaskRunner #

Patch Set 7 : Add willchan TODOs #

Total comments: 2

Patch Set 8 : fix comments #

Total comments: 33

Patch Set 9 : addressed willchan's comments #

Patch Set 10 : fix compile errors #

Patch Set 11 : Addressed willchan's comments #

Patch Set 12 : Sync to head #

Unified diffs Side-by-side diffs Delta from patch set Stats (+592 lines, -316 lines) Patch
M base/base.gypi View 1 2 3 4 5 6 7 8 4 chunks +7 lines, -0 lines 0 comments Download
M base/message_loop.h View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +3 lines, -3 lines 0 comments Download
M base/message_loop_helpers.h View 1 2 3 4 5 2 chunks +4 lines, -95 lines 0 comments Download
M base/message_loop_proxy.h View 1 2 3 4 5 2 chunks +6 lines, -117 lines 0 comments Download
M base/message_loop_proxy.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -50 lines 0 comments Download
M base/message_loop_proxy_impl.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -5 lines 0 comments Download
M base/message_loop_proxy_impl.cc View 1 2 3 4 5 6 7 8 9 3 chunks +1 line, -11 lines 0 comments Download
A base/sequenced_task_runner.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +156 lines, -0 lines 0 comments Download
A base/sequenced_task_runner.cc View 1 2 3 4 5 6 7 8 1 chunk +31 lines, -0 lines 0 comments Download
A base/sequenced_task_runner_helpers.h View 1 2 3 4 5 6 7 8 1 chunk +113 lines, -0 lines 0 comments Download
A base/single_thread_task_runner.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +38 lines, -0 lines 0 comments Download
A base/task_runner.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +155 lines, -0 lines 0 comments Download
A base/task_runner.cc View 1 2 3 4 5 6 7 8 1 chunk +68 lines, -0 lines 0 comments Download
M content/browser/browser_thread_impl.cc View 1 2 3 4 5 6 7 8 9 2 chunks +6 lines, -14 lines 0 comments Download
M remoting/base/plugin_message_loop_proxy.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -7 lines 0 comments Download
M remoting/base/plugin_message_loop_proxy.cc View 1 2 3 4 5 6 7 8 9 3 chunks +1 line, -14 lines 0 comments Download

Messages

Total messages: 70 (0 generated)
akalin
+darin for review, +willchan, ajwong in case they have any comments. This is my initial ...
8 years, 11 months ago (2012-01-25 02:40:30 UTC) #1
darin (slow to review)
I still need to let the name Executor and SerialExecutor sink in. I like that ...
8 years, 11 months ago (2012-01-25 07:25:56 UTC) #2
akalin
On 2012/01/25 07:25:56, darin wrote: > I still need to let the name Executor and ...
8 years, 11 months ago (2012-01-25 08:57:01 UTC) #3
darin (slow to review)
On Wed, Jan 25, 2012 at 12:57 AM, <akalin@chromium.org> wrote: > On 2012/01/25 07:25:56, darin ...
8 years, 11 months ago (2012-01-25 16:09:55 UTC) #4
akalin
On 2012/01/25 16:09:55, darin wrote: > such name conflicts with third party libraries are unfortunate ...
8 years, 11 months ago (2012-01-25 23:55:34 UTC) #5
akalin
Expanded class comments to explain in detail the various guarantees that Executor and SerialExecutor make. ...
8 years, 11 months ago (2012-01-25 23:56:07 UTC) #6
willchan no longer on Chromium
Sent from my iNexus from Thailand On Jan 25, 2012 11:09 PM, "Darin Fisher" <darin@chromium.org> ...
8 years, 11 months ago (2012-01-26 02:45:49 UTC) #7
akalin
On 2012/01/26 02:45:49, willchan wrote: > Using multiple threads is silly, since only one task ...
8 years, 11 months ago (2012-01-26 03:21:08 UTC) #8
darin (slow to review)
On Wed, Jan 25, 2012 at 7:21 PM, <akalin@chromium.org> wrote: > On 2012/01/26 02:45:49, willchan ...
8 years, 11 months ago (2012-01-26 03:55:52 UTC) #9
akalin
On 2012/01/26 03:55:52, darin wrote: > ^^^ This seems like a scenario that could come ...
8 years, 11 months ago (2012-01-26 04:19:10 UTC) #10
akalin
On 2012/01/26 04:19:10, akalin wrote: > On 2012/01/26 03:55:52, darin wrote: > > ^^^ This ...
8 years, 11 months ago (2012-01-26 05:22:45 UTC) #11
willchan no longer on Chromium
On Thursday, January 26, 2012, <akalin@chromium.org> wrote: > On 2012/01/26 02:45:49, willchan wrote: >> >> ...
8 years, 11 months ago (2012-01-26 14:41:23 UTC) #12
akalin
On 2012/01/26 14:41:23, willchan wrote: > Sounds weird and possibly wrong. Doesn't this end up ...
8 years, 11 months ago (2012-01-27 01:16:08 UTC) #13
akalin
I uploaded a new patch. In this one, I have three classes: Executor <- SerialExecutor ...
8 years, 11 months ago (2012-01-27 01:18:11 UTC) #14
akalin
Pinging Darin! On 2012/01/27 01:18:11, akalin wrote: > I uploaded a new patch. In this ...
8 years, 10 months ago (2012-01-31 01:48:34 UTC) #15
darin (slow to review)
I think this change will impact a lot of people. You should probably pre-announce on ...
8 years, 10 months ago (2012-01-31 07:11:48 UTC) #16
darin (slow to review)
On Thu, Jan 26, 2012 at 5:18 PM, <akalin@chromium.org> wrote: > I uploaded a new ...
8 years, 10 months ago (2012-01-31 07:20:17 UTC) #17
akalin
http://codereview.chromium.org/9169037/diff/6002/base/executor.h File base/executor.h (right): http://codereview.chromium.org/9169037/diff/6002/base/executor.h#newcode37 base/executor.h:37: // - Increasing the delay can only delay execution ...
8 years, 10 months ago (2012-01-31 23:57:29 UTC) #18
akalin
> For SingleThreadExecutor, it'd probably be nice to have a more explicit > BelongsToCurrentThread check. ...
8 years, 10 months ago (2012-01-31 23:57:57 UTC) #19
akalin
On 2012/01/31 07:11:48, darin wrote: > I think this change will impact a lot of ...
8 years, 10 months ago (2012-01-31 23:58:43 UTC) #20
akalin
Addressed all comments, please take another look.
8 years, 10 months ago (2012-01-31 23:59:21 UTC) #21
darin (slow to review)
Looks good. Now that Will is back from vacation, it'd be good to also get ...
8 years, 10 months ago (2012-02-01 05:45:22 UTC) #22
akalin
+willchan for review Also +brettw to cc (explicitly). Brett, are these interfaces in line with ...
8 years, 10 months ago (2012-02-01 05:57:18 UTC) #23
willchan no longer on Chromium
Some initial comments. I will be off to Tahoe soon so I most likely won't ...
8 years, 10 months ago (2012-02-01 10:34:10 UTC) #24
akalin
On 2012/02/01 10:34:10, willchan wrote: > Some initial comments. I will be off to Tahoe ...
8 years, 10 months ago (2012-02-01 11:13:33 UTC) #25
willchan no longer on Chromium
On Wed, Feb 1, 2012 at 3:13 AM, <akalin@chromium.org> wrote: > On 2012/02/01 10:34:10, willchan ...
8 years, 10 months ago (2012-02-01 11:30:29 UTC) #26
akalin
On Wed, Feb 1, 2012 at 3:30 AM, William Chan (陈智昌) <willchan@chromium.org>wrote: > I'm not ...
8 years, 10 months ago (2012-02-01 12:11:24 UTC) #27
willchan no longer on Chromium
On Wed, Feb 1, 2012 at 4:11 AM, Fred Akalin <akalin@chromium.org> wrote: > On Wed, ...
8 years, 10 months ago (2012-02-01 12:27:06 UTC) #28
akalin
> I may need Darin to assist here since he has more experience with the ...
8 years, 10 months ago (2012-02-02 06:55:10 UTC) #29
darin (slow to review)
On Wed, Feb 1, 2012 at 10:55 PM, <akalin@chromium.org> wrote: > I may need Darin ...
8 years, 10 months ago (2012-02-03 18:18:19 UTC) #30
willchan no longer on Chromium
On Fri, Feb 3, 2012 at 10:18 AM, Darin Fisher <darin@chromium.org> wrote: > > > ...
8 years, 10 months ago (2012-02-03 18:37:59 UTC) #31
akalin
[On Fri, Feb 3, 2012 at 10:18 AM, Darin Fisher <darin@chromium.org> wrote: > Guys, I'm ...
8 years, 10 months ago (2012-02-03 18:38:49 UTC) #32
darin (slow to review)
On Fri, Feb 3, 2012 at 10:38 AM, Fred Akalin <akalin@chromium.org> wrote: > [On Fri, ...
8 years, 10 months ago (2012-02-03 18:43:22 UTC) #33
darin (slow to review)
On Fri, Feb 3, 2012 at 10:37 AM, William Chan (陈智昌) <willchan@chromium.org>wrote: > On Fri, ...
8 years, 10 months ago (2012-02-03 18:46:59 UTC) #34
akalin
On Fri, Feb 3, 2012 at 10:43 AM, Darin Fisher <darin@chromium.org> wrote: > > I ...
8 years, 10 months ago (2012-02-03 18:51:46 UTC) #35
willchan no longer on Chromium
On Fri, Feb 3, 2012 at 10:46 AM, Darin Fisher <darin@chromium.org> wrote: > > > ...
8 years, 10 months ago (2012-02-03 18:53:37 UTC) #36
willchan no longer on Chromium
On Fri, Feb 3, 2012 at 10:51 AM, Fred Akalin <akalin@chromium.org> wrote: > On Fri, ...
8 years, 10 months ago (2012-02-03 18:55:59 UTC) #37
brettw
Sorry I didn't read all of the comments... I also like TaskRunner better than Executor. ...
8 years, 10 months ago (2012-02-03 22:42:06 UTC) #38
brettw
http://codereview.chromium.org/9169037/diff/22001/base/serial_executor.h File base/serial_executor.h (right): http://codereview.chromium.org/9169037/diff/22001/base/serial_executor.h#newcode18 base/serial_executor.h:18: // T2 will be executed after T1 iff: Just ...
8 years, 10 months ago (2012-02-03 22:42:14 UTC) #39
willchan no longer on Chromium
On Fri, Feb 3, 2012 at 2:42 PM, <brettw@chromium.org> wrote: > Sorry I didn't read ...
8 years, 10 months ago (2012-02-03 22:50:46 UTC) #40
akalin
> I see.. Yeah, moving the PostNonNestable*Task methods out of Executor / > TaskRunner makes ...
8 years, 10 months ago (2012-02-03 23:48:14 UTC) #41
brettw
> > Note that SequencedWorkerPool does not support delay and adding such > > support ...
8 years, 10 months ago (2012-02-04 03:55:51 UTC) #42
darin (slow to review)
On Fri, Feb 3, 2012 at 3:48 PM, <akalin@chromium.org> wrote: > I see.. Yeah, moving ...
8 years, 10 months ago (2012-02-04 05:29:37 UTC) #43
akalin
> > ... the concern with using PostTask is that it can cause problems if ...
8 years, 10 months ago (2012-02-04 06:49:47 UTC) #44
darin (slow to review)
On Fri, Feb 3, 2012 at 10:49 PM, Fred Akalin <akalin@chromium.org> wrote: > ... the ...
8 years, 10 months ago (2012-02-04 06:57:40 UTC) #45
willchan no longer on Chromium
On Fri, Feb 3, 2012 at 7:55 PM, <brettw@chromium.org> wrote: > > Note that SequencedWorkerPool ...
8 years, 10 months ago (2012-02-04 07:59:56 UTC) #46
willchan no longer on Chromium
On Fri, Feb 3, 2012 at 9:29 PM, Darin Fisher <darin@chromium.org> wrote: > On Fri, ...
8 years, 10 months ago (2012-02-04 08:18:11 UTC) #47
darin (slow to review)
On Sat, Feb 4, 2012 at 12:18 AM, William Chan (陈智昌) <willchan@chromium.org>wrote: > On Fri, ...
8 years, 10 months ago (2012-02-04 18:09:13 UTC) #48
akalin
Hey everyone, I uploaded a new patch, which I think addresses everyone's concerns. Highlights: - ...
8 years, 10 months ago (2012-02-07 03:01:59 UTC) #49
akalin
pinging darin + willchan + brett! On 2012/02/07 03:01:59, akalin wrote: > Hey everyone, > ...
8 years, 10 months ago (2012-02-08 00:37:04 UTC) #50
willchan no longer on Chromium
I skimmed it and think I am fine with everything now. I will re-read to ...
8 years, 10 months ago (2012-02-08 00:46:37 UTC) #51
brettw
I did a high-level look through. Looks fine to me, I'll go along with Will's ...
8 years, 10 months ago (2012-02-09 00:26:04 UTC) #52
akalin
Will, any more comments? http://codereview.chromium.org/9169037/diff/29002/base/task_runner.h File base/task_runner.h (right): http://codereview.chromium.org/9169037/diff/29002/base/task_runner.h#newcode51 base/task_runner.h:51: // - An TaskRunner that ...
8 years, 10 months ago (2012-02-09 00:36:05 UTC) #53
willchan no longer on Chromium
http://codereview.chromium.org/9169037/diff/42001/base/message_loop.h File base/message_loop.h (right): http://codereview.chromium.org/9169037/diff/42001/base/message_loop.h#newcode15 base/message_loop.h:15: #include "base/sequenced_task_runner_helpers.h" sort http://codereview.chromium.org/9169037/diff/42001/base/sequenced_task_runner.h File base/sequenced_task_runner.h (right): http://codereview.chromium.org/9169037/diff/42001/base/sequenced_task_runner.h#newcode15 base/sequenced_task_runner.h:15: ...
8 years, 10 months ago (2012-02-09 20:50:50 UTC) #54
akalin
addressed all comments, PTAL http://codereview.chromium.org/9169037/diff/42001/base/message_loop.h File base/message_loop.h (right): http://codereview.chromium.org/9169037/diff/42001/base/message_loop.h#newcode15 base/message_loop.h:15: #include "base/sequenced_task_runner_helpers.h" On 2012/02/09 20:50:50, ...
8 years, 10 months ago (2012-02-10 22:48:59 UTC) #55
akalin
Ping, darin and willchan! On 2012/02/10 22:48:59, akalin wrote: > addressed all comments, PTAL > ...
8 years, 10 months ago (2012-02-13 18:24:20 UTC) #56
willchan no longer on Chromium
http://codereview.chromium.org/9169037/diff/42001/base/sequenced_task_runner.h File base/sequenced_task_runner.h (right): http://codereview.chromium.org/9169037/diff/42001/base/sequenced_task_runner.h#newcode30 base/sequenced_task_runner.h:30: // - Given two tasks T2 and T1 that ...
8 years, 10 months ago (2012-02-14 05:59:07 UTC) #57
akalin
> > I need to reflect on this further. What happens in the case where ...
8 years, 10 months ago (2012-02-14 10:47:42 UTC) #58
willchan no longer on Chromium
On 2012/02/14 10:47:42, akalin wrote: > > > > I need to reflect on this ...
8 years, 10 months ago (2012-02-14 19:09:01 UTC) #59
akalin
> Okay, after thinking about it, I think you're right. Allowing C to run > ...
8 years, 10 months ago (2012-02-14 19:41:15 UTC) #60
akalin
> For things like this, is it possible to write templated tests? Then anytime > ...
8 years, 10 months ago (2012-02-14 19:41:54 UTC) #61
darin (slow to review)
I'm happy with the class and method names. I defer to Will for the final ...
8 years, 10 months ago (2012-02-14 19:45:17 UTC) #62
willchan no longer on Chromium
Everything else looks great to me. I probably missed something minor in the comments because ...
8 years, 10 months ago (2012-02-14 23:19:20 UTC) #63
akalin
On 2012/02/14 23:19:20, willchan wrote: > Everything else looks great to me. I probably missed ...
8 years, 10 months ago (2012-02-14 23:21:56 UTC) #64
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/akalin@chromium.org/9169037/34006
8 years, 10 months ago (2012-02-14 23:25:40 UTC) #65
commit-bot: I haz the power
Presubmit check for 9169037-34006 failed and returned exit status 1. Running presubmit commit checks ...
8 years, 10 months ago (2012-02-14 23:25:57 UTC) #66
akalin
+sergeyu for review of remoting code
8 years, 10 months ago (2012-02-14 23:27:11 UTC) #67
garykac
LGTM for remoting code.
8 years, 10 months ago (2012-02-15 00:05:57 UTC) #68
Sergey Ulanov
This is awesome, thanks for working on it! remoting changes LGTM.
8 years, 10 months ago (2012-02-15 00:39:17 UTC) #69
commit-bot: I haz the power
8 years, 10 months ago (2012-02-15 01:00:31 UTC) #70

Powered by Google App Engine
This is Rietveld 408576698