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

Issue 2262043002: MidiScheduler binds to task runner of constructing thread (Closed)

Created:
4 years, 4 months ago by Shao-Chuan Lee
Modified:
4 years, 4 months ago
Reviewers:
Takashi Toyoshima
CC:
chromium-reviews, feature-media-reviews_chromium.org, toyoshim+midi_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

MidiScheduler binds to task runner of constructing thread Now PostSendDataTask() posts to the bound task runner, and ensures that constructor/destructor and InvokeClosure() are called on the same thread. R=toyoshim@chromium.org Committed: https://crrev.com/37e75a069c8d9ec4de2b6af29055633b76bbaf3b Cr-Commit-Position: refs/heads/master@{#413981}

Patch Set 1 #

Patch Set 2 : bind to constructing thread #

Total comments: 7

Patch Set 3 : fix MidiScheduler misuse #

Patch Set 4 : lock for safe MidiScheduler destruction #

Patch Set 5 : comments #

Patch Set 6 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+67 lines, -13 lines) Patch
M media/midi/midi_manager_android.h View 1 2 3 3 chunks +7 lines, -1 line 0 comments Download
M media/midi/midi_manager_android.cc View 1 2 3 2 chunks +16 lines, -2 lines 0 comments Download
M media/midi/midi_manager_usb.h View 1 2 3 3 chunks +5 lines, -0 lines 0 comments Download
M media/midi/midi_manager_usb.cc View 1 2 3 2 chunks +14 lines, -1 line 0 comments Download
M media/midi/midi_scheduler.h View 1 2 3 4 3 chunks +18 lines, -3 lines 0 comments Download
M media/midi/midi_scheduler.cc View 1 2 3 4 3 chunks +7 lines, -6 lines 0 comments Download

Messages

Total messages: 40 (23 generated)
Shao-Chuan Lee
4 years, 4 months ago (2016-08-22 06:18:40 UTC) #1
Takashi Toyoshima (Google)
Thank you for making this. While I'm reviewing this change, I find a race issue ...
4 years, 4 months ago (2016-08-22 07:28:26 UTC) #2
Takashi Toyoshima (Google)
Optional: You may write a simple unit test to check thread safety by running itwith ...
4 years, 4 months ago (2016-08-22 07:30:52 UTC) #3
Shao-Chuan Lee
Now MidiScheduler binds to the thread on which it's constructed, to ensure constructor/destructor and InvokeClosure() ...
4 years, 4 months ago (2016-08-23 04:56:59 UTC) #4
Takashi Toyoshima
code looks good, but I have some requests to add more comments to avoid someone ...
4 years, 4 months ago (2016-08-23 05:30:42 UTC) #5
Takashi Toyoshima
Also, I kicked CQ dry run because the code already looks good as far as ...
4 years, 4 months ago (2016-08-23 05:32:54 UTC) #8
Takashi Toyoshima
Looks good except for |task_runner| I commented at #5. Once CL description is updated and ...
4 years, 4 months ago (2016-08-23 09:14:19 UTC) #20
Shao-Chuan Lee
https://codereview.chromium.org/2262043002/diff/20001/media/midi/midi_scheduler.cc File media/midi/midi_scheduler.cc (right): https://codereview.chromium.org/2262043002/diff/20001/media/midi/midi_scheduler.cc#newcode37 media/midi/midi_scheduler.cc:37: weak_factory_.GetWeakPtr(), On 2016/08/23 05:30:41, toyoshim wrote: > OK, but ...
4 years, 4 months ago (2016-08-23 09:36:08 UTC) #21
Takashi Toyoshima
lgtm
4 years, 4 months ago (2016-08-23 09:42:00 UTC) #22
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/2262043002/80001
4 years, 4 months ago (2016-08-23 09:42:40 UTC) #24
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/278936)
4 years, 4 months ago (2016-08-23 13:36:19 UTC) #26
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/2262043002/80001
4 years, 4 months ago (2016-08-23 13:38:33 UTC) #28
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/2262043002/80001
4 years, 4 months ago (2016-08-23 13:39:32 UTC) #31
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/279064)
4 years, 4 months ago (2016-08-23 16:31:00 UTC) #33
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/2262043002/100001
4 years, 4 months ago (2016-08-24 01:23:17 UTC) #36
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 4 months ago (2016-08-24 05:03:13 UTC) #38
commit-bot: I haz the power
4 years, 4 months ago (2016-08-24 05:05:06 UTC) #40
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/37e75a069c8d9ec4de2b6af29055633b76bbaf3b
Cr-Commit-Position: refs/heads/master@{#413981}

Powered by Google App Engine
This is Rietveld 408576698